Throttling error for batching

Volodymyr Gula 1 Reputation point
2022-09-22T15:27:31.287+00:00

Hi.
I'm trying to make a batch request to Microsoft Graph API from my account.
I'm making 1 batch request with 6 requests in it.
1 request example:

{
"body":{
"attendees":[
{
"emailAddress":{
"address":"expert4testing@Stuff .com",
"name":"Prospect Prospect"
},
"type":"Required"
}
],
"body":{
"content":"<div>Hello world</div>",
"contentType":"HTML"
},
"end":{
"dateTime":"2022-09-29T11:16:48.084380",
"timeZone":"UTC"
},
"locations":[],
"start":{
"dateTime":"2022-09-29T10:43:28.084380",
"timeZone":"UTC"
},
"subject":"My test",
"transactionId":"a36cbf01-7bcd-42f8-a178-b8aa2e8441d2"
},
"headers":{
"Content-Type":"application/json"
},
"id":"21b1c31f-ec5c-499c-9e45-b68205a75131",
"method":"POST",
"url":"users/EMAIL/events"
}

All these 6 requests should create 6 events in the user's calendar.
When I run a batch locally, I can process only 4 events per 1 request.
For 2 other requests in a batch I receive 429 error with next body:

{
"body":{
"error":{
"code":"ApplicationThrottled",
"message":"Application is over its MailboxConcurrency limit."
}
},
"headers":{
"Cache-Control":"private",
"Content-Type":"application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8",
"Retry-After":"9"
},
"id":"0da4fa52-e691-4cf8-8e0f-dc9cdd5dd60d",
"status":429
}

I've found the info here https://learn.microsoft.com/en-us/graph/throttling-limits#outlook-service-limits
that it might depend on the fact that API can handle only 4 concurrent requests for such queries.

But I tried to run it from my staging env and successfully handled 6 requests per 1 batch request.
I used the same creds.
I've noticed only 1 difference in the response header.
This is from my staging env(where I processed 6 events per 1 batch request):

  {"x-ms-ags-diagnostic",    
   "{\"ServerInfo\":{\"DataCenter\":\"North Europe\",\"Slice\":\"E\",\"Ring\":\"4\",\"ScaleUnit\":\"005\",\"RoleInstance\":\"DU6PEPF00002DCD\"}}"},    
  {"date", "Thu, 22 Sep 2022 13:14:31 GMT"}    

And this is from my local env(where I processed only 4 events per 1 batch request):

 {"x-ms-ags-diagnostic",    
  "{\"ServerInfo\":{\"DataCenter\":\"West Europe\",\"Slice\":\"E\",\"Ring\":\"5\",\"ScaleUnit\":\"004\",\"RoleInstance\":\"AM2PEPF000107DF\"}}"},    
 {"date", "Thu, 22 Sep 2022 13:14:12 GMT"}    

So the question is why the system behaves differently with the same creds?
How can I make my system to process all 6 events in 1 batch?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,515 questions
0 comments No comments
{count} votes