Adam Greenaway
Adam Greenaway

Reputation: 11

Microsoft Graph for OneDrive Throttling Issue - RetryAfter Property is null

We use Microsoft Graph.dll (version 1.2.1) and Microsoft.Graph.Core.dll (version 1.3.1) to extract OneDrive folder and file information (with permissions). We have been doing this successfully for over a year. When doing this we are sometimes throttled. When this happens an exception is thrown of type "Microsoft.Graph.ServiceException". This has a status code. If the status code is 429 then we know we have been throttled and we can examine the response headers in the exception to extract the required "RetryAfter" period. I believe normally the RetryPeriod is 4000ms. We have, however, just recently begun begun to see null returned in this property - which seems incorrect, we don't believe we have seen it before.

Has anybody else seen this and/or have a workaround? Has something changed....?

Many thanks ....

Upvotes: 1

Views: 272

Answers (1)

Michael Mainer
Michael Mainer

Reputation: 3465

That does sound unexpected. I will follow up and see if something has changed. I suggest that you implement a progressive retry routine if the retryafter header is not present on a 429 or 503.

While on the topic on RetryAfter, we've implemented this in the client library (see the PR). You'll have an out of box way to do this.

Upvotes: 1

Related Questions