As of this week I am suddenly getting gateway timeout
from Graph when my mail search finds no results.
I am using a query like this one:
https://graph.microsoft.com/v1.0/users/shared@notreal.com/mailFolders/AllItems/messages?$search="participants:some.person@fake.com"&$select=from,subject,HasAttachments,Id,SentDateTime&$top=100
This is a Graph query which requests up to 100 emails from the Office 365 mailbox of shared@notreal.com
where the sender or receiver includes some.person@fake.com
. shared@notreal.com
is a mailbox that is shared with the account making the call.
My app is authenticated with the oauth2 authentication code flow and has been granted all necessary permissions.
This has been working for about a year. But starting a few days ago, this query only succeeds if results are found. When no results are found, the query takes 30 seconds, Graph returns UnknownError
and the response is 504
with reasonphrase Gateway Timeout
.
It seems as though something has changed in the Graph API - or perhaps in the Office 365 API, but I can't find any mention of it anywhere.
Microsoft specifically directs questions about the Graph API to stackoverflow, so here I am. I hope the right people are reading.
Why has this suddenly started happening and how can I fix it?
Update: there are now numerous reports of this issue, confirming that it's at Microsoft's end.
We saw this question and were actively investigating this kast week. With July 4th long weekend I hadn't got back to this thread until now.
This issue has been resolved on the back end of the service and you should not be seeing this issue anymore.
Thank you so much for sharing the service issue here.
This issue seems to be resolved on our end now.
来源:https://stackoverflow.com/questions/56880644/why-do-i-get-gateway-timeout-whenever-my-ms-graph-api-mail-search-finds-no-resul