Microsoft graph batch API concurrent request reduction to 4 where as outlook API had 200 concurrent requests

Hari 6 Reputation points
2022-08-16T10:24:17+00:00

The Outlook Batch API is use send multiple Outlook REST requests in a single HTTP batch request. In Outlook Batch API, we make 200 requests in the same batch HTTP request and all the concurrent requests succeed. Whereas if we do the same in graph API only 4 concurrent requests succeed as only 4 concurrent requests are supported in graph APIs (attached request and response).

We have the cases such as 10000 events creating at once(like users can add/remove 10000 items from a single user calendar).

So it would be of great help if the Graph APIs batch limit is set to be same as Outlook API(200 concurrent request).

Sample request:

   Request url - https://graph.microsoft.com/v1.0/$batch  
   method - POST  
   request payload:  
   {  
       "requests": [  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "1",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test1s"  
               }  
           },  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "2",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test2"  
               }  
           },  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "3",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test3"  
               }  
           },  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "4",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test4"  
               }  
           },  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "5",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test5s"  
               }  
           },  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "6",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test6s"  
               }  
           },  
           {  
               "url": "/me/calendars",  
               "method": "POST",  
               "id": "7",  
               "headers": {  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "name": "test7s"  
               }  
           }  
       ]  
   }  

Sample response:

   {  
       "responses": [  
           {  
               "id": "6",  
               "status": 429,  
               "headers": {  
                   "Retry-After": "1",  
                   "Cache-Control": "private",  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "error": {  
                       "code": "ApplicationThrottled",  
                       "message": "Application is over its MailboxConcurrency limit.",  
                       "innerError": {  
                           "date": "2022-08-11T06:21:56",  
                           "request-id": "e09afe6b-25d6-4cdc-93f5-0539d6e8b9c6",  
                           "client-request-id": "efe22070-473c-28bd-d1bf-ad43bb9f753f"  
                       }  
                   }  
               }  
           },  
           {  
               "id": "7",  
               "status": 429,  
               "headers": {  
                   "Retry-After": "1",  
                   "Cache-Control": "private",  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "error": {  
                       "code": "ApplicationThrottled",  
                       "message": "Application is over its MailboxConcurrency limit.",  
                       "innerError": {  
                           "date": "2022-08-11T06:21:56",  
                           "request-id": "e09afe6b-25d6-4cdc-93f5-0539d6e8b9c6",  
                           "client-request-id": "efe22070-473c-28bd-d1bf-ad43bb9f753f"  
                       }  
                   }  
               }  
           },  
           {  
               "id": "4",  
               "status": 429,  
               "headers": {  
                   "Retry-After": "1",  
                   "Cache-Control": "private",  
                   "Content-Type": "application/json"  
               },  
               "body": {  
                   "error": {  
                       "code": "ApplicationThrottled",  
                       "message": "Application is over its MailboxConcurrency limit.",  
                       "innerError": {  
                           "date": "2022-08-11T06:21:56",  
                           "request-id": "e09afe6b-25d6-4cdc-93f5-0539d6e8b9c6",  
                           "client-request-id": "efe22070-473c-28bd-d1bf-ad43bb9f753f"  
                       }  
                   }  
               }  
           },  
           {  
               "id": "5",  
               "status": 201,  
               "headers": {  
                   "Location": x"https://outlook.office.com/api/v2.0/Users('xxxx')/Calendars('xxxx')",  
                   "Cache-Control": "private",  
                   "OData-Version": "4.0",  
                   "Content-Type": "application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"  
               },  
               "body": {  
                   "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('xxxxx')/calendars/$entity",  
                   "id": "xxx",  
                   "name": "test5s",  
                   "color": "auto",  
                   "hexColor": "",  
                   "isDefaultCalendar": false,  
                   "changeKey": "xxxxx",  
                   "canShare": true,  
                   "canViewPrivateItems": true,  
                   "canEdit": true,  
                   "allowedOnlineMeetingProviders": [  
                       "teamsForBusiness"  
                   ],  
                   "defaultOnlineMeetingProvider": "teamsForBusiness",  
                   "isTallyingResponses": false,  
                   "isRemovable": true,  
                   "owner": {  
                       "name": "xxxx",  
                       "address": "xxxx.onmicrosoft.com"  
                   }  
               }  
           },  
           {  
               "id": "2",  
               "status": 201,  
               "headers": {  
                   "Location": "https://outlook.office.com/api/v2.0/Users('xxxx')/Calendars('xxxx')",  
                   "Cache-Control": "private",  
                   "OData-Version": "4.0",  
                   "Content-Type": "application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"  
               },  
               "body": {  
                   "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('xx')/calendars/$entity",  
                   "id": "xxx",  
                   "name": "test2",  
                   "color": "auto",  
                   "hexColor": "",  
                   "isDefaultCalendar": false,  
                   "changeKey": "xxxxx",  
                   "canShare": true,  
                   "canViewPrivateItems": true,  
                   "canEdit": true,  
                   "allowedOnlineMeetingProviders": [  
                       "teamsForBusiness"  
                   ],  
                   "defaultOnlineMeetingProvider": "teamsForBusiness",  
                   "isTallyingResponses": false,  
                   "isRemovable": true,  
                   "owner": {  
                       "name": "xxxx",  
                       "address": "xxxxx.onmicrosoft.com"  
                   }  
               }  
           },  
           {  
               "id": "3",  
               "status": 201,  
               "headers": {  
                   "Location": "https://outlook.office.com/api/v2.0/Users('xxxx')/Calendars('xxxxx')",  
                   "Cache-Control": "private",  
                   "OData-Version": "4.0",  
                   "Content-Type": "application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"  
               },  
               "body": {  
                   "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('xxx')/calendars/$entity",  
                   "id": "x",  
                   "name": "test3",  
                   "color": "auto",  
                   "hexColor": "",  
                   "isDefaultCalendar": false,  
                   "changeKey": "xxxxxx==",  
                   "canShare": true,  
                   "canViewPrivateItems": true,  
                   "canEdit": true,  
                   "allowedOnlineMeetingProviders": [  
                       "teamsForBusiness"  
                   ],  
                   "defaultOnlineMeetingProvider": "teamsForBusiness",  
                   "isTallyingResponses": false,  
                   "isRemovable": true,  
                   "owner": {  
                       "name": "xxxx",  
                       "address": "xxxxxx.onmicrosoft.com"  
                   }  
               }  
           },  
           {  
               "id": "1",  
               "status": 201,  
               "headers": {  
                   "Location": "https://outlook.office.com/api/v2.0/Users('xxxx')/Calendars('xxxx')",  
                   "Cache-Control": "private",  
                   "OData-Version": "4.0",  
                   "Content-Type": "application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"  
               },  
               "body": {  
                   "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('xxxxx')/calendars/$entity",  
                   "id": "xxxxxx",  
                   "name": "test1s",  
                   "color": "auto",  
                   "hexColor": "",  
                   "isDefaultCalendar": false,  
                   "changeKey": "xxxxxxx",  
                   "canShare": true,  
                   "canViewPrivateItems": true,  
                   "canEdit": true,  
                   "allowedOnlineMeetingProviders": [  
                       "teamsForBusiness"  
                   ],  
                   "defaultOnlineMeetingProvider": "teamsForBusiness",  
                   "isTallyingResponses": false,  
                   "isRemovable": true,  
                   "owner": {  
                       "name": "xxxx",  
                       "address": "xxxxx.onmicrosoft.com"  
                   }  
               }  
           }  
       ]  
   }  
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,646 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,691 Reputation points Microsoft Vendor
    2022-08-16T17:05:10.687+00:00

    Hi @Hari ,

    Batches targeting Outlook resources (such as mail and calendar) can only contain four requests targeting the same mailbox. For details, see Outlook service limits.

    This is by design and exceeding these limits will result in throttling any more requests from user.
    You can request for increase batch limit via the Graph Feedback Portal, which will be monitored by Microsoft Product Engineering team who will take up based on no of votes and people requesting for such feature

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".