1

近五个月以来,我一直在使用 Microsoft Graph Api 的 v1.0列表消息方法。

在过去的几天里,当我在查询字符串中添加$search参数时,它开始返回错误。它给出了503504错误代码

在 give 或 take 20 秒后收到错误。

以及以下消息:

 {
      "error": {
      "code": "UnknownError",
       "message": "",
       "innerError": {
           "request-id": "8fd1d9ed-cde6-4237-b1a7-ab089a28d37e",
             "date": "2019-07-02T10:09:48"
       }
   }
}

Microsoft 图形错误

  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.

我通过微软的开发者工具 Graph Explorer调用 api 方法

带有错误和请求的屏幕截图

直到最近才使用的 API 调用示例:

 https://graph.microsoft.com/v1.0/<COMPANY_ID>/users/<USER_ID>/messages?
$search=%22from:<MY_EMAIL>%22&$top=10

始终有效的 API 调用示例(不带 $search 参数)

 https://graph.microsoft.com/v1.0/<COMPANY_ID>/users/<USER_ID>/messages  

在这件事上,我无法从 MS 支持部门获得帮助。他们实际上将我推荐给SO。

希望有人遇到了这个问题,可以对此事有所了解。

提前致谢。

4

1 回答 1

1

我在通过 Graph-API 搜索电子邮件时遇到了类似的问题。

深入研究它,它发生在我没有返回结果的查询中。为了进行测试,我在其中一个失败的查询中使用了我正在搜索的术语,并将电子邮件主题行中包含该术语的测试邮件发送到我正在搜索的框中。下一个查询立即返回结果。

然后我删除了电子邮件,再次尝试,再次收到 504。

7/5 更新:这个问题似乎已经为我解决了,我不再收到 504 空结果

于 2019-07-02T18:02:36.107 回答