Graph API timeouts

Krasa 36 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.
9,107 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vicky Kumar (Mindtree Consulting PVT LTD) 1,156 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"