Intermittent 503 Service Unavailabe errors for some mailboxes on some paginated batches on the /messages endpoint

Jeroen Corthout 0 Reputation points

I'm paginating through the messages of a mailbox in batches of 40. Most batches for most mailboxes are fine. Sometimes a batch throws a 503 Service Unavailable error and even after retrying with exponential backoff, the error persists. An example of batch that keeps failing (redacted the email address)

The error doesn't contain a Retry-After header (not even a request id either):

Any advice on how to resolve this? It doesn't seem like I'm getting throttled but rather just an issue on Microsoft's end.

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