问题
I've been using Microsoft Graph Api's v1.0 List messages method for nearly five months.
In the last few days it started returning errors when ever i add the $search parameter in my query string. It gives either a 503 or 504 error code
The error is received after give or take 20 sec.
along with following message:
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "8fd1d9ed-cde6-4237-b1a7-ab089a28d37e",
"date": "2019-07-02T10:09:48"
}
}
}
Microsoft Graph errors
503 Service Unavailable The service is temporarily unavailable for maintenance or is overloaded. You may repeat the request after a delay, the length of which may be specified in a Retry-After header.
504 Gateway Timeout The server, while acting as a proxy, did not receive a timely response from the upstream server it needed to access in attempting to complete the request. May occur together with 503.
I am calling the api methods via microsoft's Developer tool Graph Explorer
Example of the API call that use to work until lately:
https://graph.microsoft.com/v1.0/<COMPANY_ID>/users/<USER_ID>/messages?
$search=%22from:<MY_EMAIL>%22&$top=10
Example of an API call which always works (with out the $search parameter)
https://graph.microsoft.com/v1.0/<COMPANY_ID>/users/<USER_ID>/messages
I was unable to get assistance from MS support in this matter. They actually refereed me to SO.
Hopefully someone came across this issue and can shed some light on the matter.
Thanks in advance.
回答1:
I'm hitting a similar issue searching Emails through the Graph-API.
Digging into it, it's happening to my queries where there are no results to return. To test, I took the term I was searching for in one of the failed queries and sent a test mail with that term in the subject line of the email to the box I was searching. Next query returned a result immediately.
I then deleted the email, tried again, and received a 504 again.
Update 7/5: The issue appears to have been resolved for me, I no longer receive a 504 on null results
来源:https://stackoverflow.com/questions/56850282/microsoft-graph-api-errors