Hello,
We are having a problem with MS Graph responding with HTTP 429 "Too Many Requests" from a fairly low amount of requests, using an app-wide access token from Azure AD for all our tenants, which currently is only one test account for the developers.
Project Background:
The project is a web app (frontend = SPA, backend = API) that will only be used internally by the organization (currently under development. All frontend calls related to MS Graph is funneled via our backend, with token management and the actual http requests, and then the result of that is processed and served back to frontend.
What we are doing:
We are using an app-wide token from Azure AD that we will utilize to manage all our internal user. IIRC, this app-wide token only has a lifecycle of one hour or so, but we cache it and handle its lifecycle internally - acquiring, refreshing and caching the token as it becomes necessary. We are using this app-wide token because we can manage all requests for all users with one token, which is very convenient. Otherwise, we would have to manage all users' Azure ID's as well as every user's graph token lifecycle, as well as Webhook/Subscription management.
Problem description:
We implemented this system on the backend a few months ago, and had no problems with it. It was not until a few days ago (when one of our developers implemented an email interface on the frontend) that our HTTP requests to MS Graph started to get us "HTTP 429 - Too Many Requests" errors. We find this weird, because we only have one internal test user that our small development team is using, and there is never more than one developer accessing the MS Graph API at the same time.
The appearance of this error response is seemingly unpredictable, from the limited testing we've done to it, and does not necessarily affect every single request we make after the error starts to appear (e.g. a retry would in rare occasions yield a success, but oftentimes not). We have also received the error on the first request after coming back from a lunch break.
Here is an example response error message we receive when we get the HTTP 429 response (from earlier this morning):
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "eef9cfe6-ece0-4480-90d4-4babd82d9ac6",
"date": "2016-12-06T09:06:24"
}
}
}
Since the amount of requests is so small (less than one per second) during our initial tests (with one single test user), we're worried what this means for the future use of MS Graph in our application, since the product is going to be used by our employees (up to 100 consecutive users) in a few months from now.
During a brief chat with AzureSupport on Twitter yesterday, we recieved this link (https://docs.microsoft.com/en-us/rest/api/searchservice/http-status-codes) which talks about Index Limits, but we believe that is not related to us since we do not utilize Azure Search nor having the feature activated in the portal. All attempts to dig up any relevant information on this has been unfruitful so far.
What can we do? We're positive there should be a solution to this somehow.
Thank you in advance.
Kind regards,
Jimmy S