Everyone. I'm encountering two main issues with my Python script that interacts with the OneDrive API using MSAL (Microsoft Authentication Library). Despite implementing a token refresh mechanism, the script stops downloading after one hour. Additionally, when attempting to download a folder with over 4000 files, it only retrieves around 200 files before skipping to the next folder which has about 5 files downloads all the files and then moves to the third folder downloads some folders/files, and then stops downloading, while the script runs infinitely. Here's a summary of the problems:
Token Refresh Issue: Despite incorporating token refreshing in my script, it seems to stop working after one hour, leading to interruptions in the downloading process. How can I troubleshoot and address this issue effectively?
Handling Large File Counts: When attempting to download a folder with over 4000 files, the script only retrieves a fraction (200) of them before moving to the next folder. After a while, it completely stops downloading and the below script simply runs infinitely. Are there any limitations or best practices I should be aware of when dealing with large file counts in OneDrive?
Could someone guide me on resolving these issues or suggest alternative approaches to ensure seamless token refreshing and efficient handling of large file counts in my script?
I'd appreciate any insights or recommendations you can offer. Thank you in advance for your help!
I was expecting the script to run like I intended to. However, I am getting issues where the script simply stops downloading the files after about 1 hour. I even implemented a loop to get the refresh token but it doesn't seem to work. enter image description here