Graph API timeouts

Krasa 41 Reputation points
2022-03-28T14:22:13.22+00:00

It happened to me multiple times, that when I do a moderate number of requests (in a single thread), then sometimes Graph API timeouts, randomly on any call (even after 30 seconds).

example:

GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 10012 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://graph.microsoft.com/v1.0/drives/xxx/items/xxx/invite

Not sure where is the problem, it happened on the AWS, and on my local PC, so I would expect the problem to be with Microsoft servers.
No idea where to report it or what to do.

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

2 answers

Sort by: Most helpful
  1. Lathrop, John 5 Reputation points
    2024-07-05T15:59:46.06+00:00

    We are having the exact same issue with the invitations API. It happens if the API takes 30 seconds to respond. It seems the invitations succeed based on the generated invite email and the new user state in Azure...so far. This is a problem right now because we use the user objectID in the response for subsequent actions.

    This is a Microsoft issue to fix. And it looks like it has been for several years.
    User's image

    1 person found this answer helpful.
    0 comments No comments

  2. Vicky Kumar (Mindtree Consulting PVT LTD) 1,161 Reputation points Microsoft Employee
    2022-03-29T08:00:12.09+00:00

    The access token has certain timeout time, but we can still customize the lifetime of the access token by configuring the token lifetime policy.

    $policy = New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"02:00:00"}}') -DisplayName "WebPolicyScenario" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"


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.