Forum Discussion
Christophe Humbert
Mar 29, 2021Iron Contributor
429 throttling even though I wait for each request to complete
I am using the Graph API in SPFx (MSGraphClient).
I need to add events to a user calendar (usually between 10 and 20 for the month). Unfortunately, https://docs.microsoft.com/en-us/graph/throttling#outlook-service-limits (!).
To try and prevent concurrent events, I am executing the requests one at a time, with an await expression:
for (let i = 0; i < locks.length; i++) {
let lock = locks[i];
await props.context.msGraphClientFactory.getClient()
.then((client: MSGraphClient😞 void => {
client
.api("/me/events")
.post({
"subject":...
This doesn't work, I am still getting 429 throttling message even though the requests are not concurrent. What am I missing here, and what would be the proper way to handle the situation?
2 Replies
Sort By
- Maria-MendiburoFormer EmployeeHi Christophe - The SPFx team actively monitors this Github repo for questions, so I suggest posting your inquiry there: https://github.com/SharePoint/sp-dev-docs
- Christophe HumbertIron Contributor
I have created a SPFx package that reproduces the issue:
https://github.com/PathToSharePoint/Outlook-Throttling
Note that it requires Graph API permissions.