Clarification on Microsoft Graph Batch API Limits and Quota Increase for Microsoft Teams

Prathamesh Boratne 5 Reputation points
2024-06-19T16:17:08.8566667+00:00

I am currently working on a project where I need to send messages to over 20+ users individually on Microsoft Teams using the Microsoft Graph Batch API. The first batch of 20 messages sends successfully, but when I try to send the next batch, I receive an error indicating that the API call quota has been exceeded.

Here are the details of my implementation:

  • I am using the Microsoft Graph Batch API (one-on-one) to send the messages.
  • The first batch of 20 messages works without any issues.
  • Subsequent batches fail with an "API call quota exceeds" error.
  • API Endpoint: https://graph.microsoft.com/v1.0/$batch

According to the Microsoft documentation, it is mentioned that 20 requests per second (rps) are supported. However, after the first batch, I have to wait 8 seconds before sending the second batch, otherwise, I receive a 429 error.

I have a few questions:

  1. What are the specific limits on the number of messages or API calls that can be made within a certain timeframe when using the Microsoft Graph Batch API for Microsoft Teams?
  2. Is there a way to increase the quota for API calls?

Thank you for your assistance.

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

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 1,400 Reputation points Microsoft Vendor
    2024-06-20T07:09:59.99+00:00

    Hi @Prathamesh Boratne

    The limits on calling the Graph API are explained in detail in the documentation, and the limits on sending messages can be seen in the diagram.

    User's image

    There is no way to increase the quota of API calls, but the documentation provides other ways to handle limits, such as reducing the number of operands per request; Reduce the frequency of calls; Avoid retrying immediately, as all requests accumulate based on usage limits. See the documentation for more details.

    You should also take a look here: Microsoft Throttling Pattern

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.