Receiving "tooManyRequest" with Message "Too many requests from Identifier: West Europe ..."

Kloth, Ralf 1 Reputation point
2022-12-22T09:10:20.247+00:00

Hi,

our multi-tenant application does renew the subscription for change notifications every 30 minutes. So for every tenant the list of current subscriptions is retrieved "GraphDelegatedClient.Subscriptions.Request().GetAsync()" and further processed. This call - from time to time - fails with the message "Too many requests from Identifier: West Europe ..." - see the whole response below. For me it is not clear, what exactly the problem is and how I can handle this (a rety is done 3 times - but this sometimes is not enough). Especially that I do not hit any limit as there is no indication in the header (like "x-ms-ratelimit...").

Could someone please explain what the problem is and how to handle it?

Response-Data
Header:
Transfer-Encoding: chunked
Retry-After: 5
Strict-Transport-Security: max-age=31536000
request-id: a15c7ea4-d7e4-4d57-9cf0-d5b8fd22aad0
client-request-id: a15c7ea4-d7e4-4d57-9cf0-d5b8fd22aad0
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"AM1PEPF0001A38D"}}
Date: Thu, 22 Dec 2022 08:00:18 GMT

Content:
{
"error":{
"code":"TooManyRequests",
"message":"Too many requests from Identifier:West Europe under category:throttle.aad.ags.subscriptionservice.dc.list. Please try again later.",
"innerError":{
"date":"2022-12-22T08:00:18",
"request-id":"a15c7ea4-d7e4-4d57-9cf0-d5b8fd22aad0",
"client-request-id":"a15c7ea4-d7e4-4d57-9cf0-d5b8fd22aad0"
}
}
}

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vicky Kumar (Mindtree Consulting PVT LTD) 1,161 Reputation points Microsoft Employee
    2022-12-22T11:18:40.917+00:00

    The status code returned for throttled requests is 429, indicating too many requests. All requests that are throttled by Microsoft Graph will return 429 when they're throttled. Most of the services has their own rules and calculations for when limits are exceeded, and future requests will be throttled.
    Subscriptions service limits

    The header value, Retry-After, is an integer that represents the number of seconds the client should wait before submitting the request again. Any requests sent before this time will continue to be throttled and may cause the Retry-After value to increase as well. Best practice to Handel throttling

    In your case you can see header, Retry-After: 5 , you have to retry after 5 sec, that will work

    for more info regrading throttling , please see the doc - https://learn.microsoft.com/en-us/graph/throttling


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.