An API that connects multiple Microsoft services, enabling data access and automation across platforms
File upload request
Create Sharable link request
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a python script which loads 500 excel files (1,34Mo) on SharePoint. This script has always worked (1 year) until last week.
I suddenly received "Response 429" and Retry after 120s too many time.
Has workaround, I added more delay between each loading file (5s then10s) But 10s is to long for what I want and finally I reach a log out response [401] before and of process. I also adde retry after 120s but is too long for 500 files.
So now I need to find a way to avoid that Reponse 429 without wait to long time between each file The Sharepoint connection is done with delegated permission with user permission to take the token and after that I send post request file load on sharpoint folder.
The general process is a loop (250 iteration) : - posts 2 files on sharepoint - creates link to pickup shareable link I have the Microsoft 365 Business Standard licence.
Do you have any advise ? (related code bellow)
An API that connects multiple Microsoft services, enabling data access and automation across platforms
File upload request
Create Sharable link request
Hello @Zehui Yao_MSFT ,
This is what i did. But the delay is up to 120s (quiet long).
So when I reach this 2 or 3 timesafter it's seems that I hit a session disconnection because I have a 502 reponse.
I manage it as I can but my "real" question was why suddenly it happen ? I use it seens 1 year wihtout any 429 response.
But thanks four your time.
Hello @FRUITSTOCK SARL , According to the documentation, backing off requests using the Retry-After delay is the fastest way to recover from throttling.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.