小编msa*_*aad的帖子

Microsoft Graph请求上以前有效的InficientFilter错误

向MS Graph发出以下请求,以检索按到期日期排序的标记消息:

https://graph.microsoft.com/beta/me/messages?$filter=flag/flagStatus%20eq%20%27flagged%27&$orderby=flag/dueDateTime/dateTime%20desc&$top=100

之前会成功,并且会返回预期的结果。最近,一些用户已经收到以下响应:

{
  "error": {
    "code": "InefficientFilter",
    "message": "The restriction or sort order is too complex for this operation.",
    "innerError": {
      "request-id": "5ef714c9-39a0-4167-a4d0-3682dcb46de4",
      "date": "2016-11-17T16:41:16"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

图表中是否引入了错误?

奇怪的是,该请求以前没有问题,现在被认为效率低下。它也仅在某些用户的帐户上发生。

以下请求检索按接收日期排序的电子邮件附件的请求也发生了相同的问题:

https://graph.microsoft.com/v1.0/me/messages?$filter=hasAttachments%20eq%20true&$orderby=receivedDateTime%20desc&$expand=attachments($select=name,contentType,size,lastModifiedDateTime)&$top=6

现在将获得相同的InefficientFilter错误响应。请注意,第二个请求是针对v1.0 API的,因此这不仅限于beta。

另请注意,删除受影响帐户上的orderby子句将使请求成功。

office365 azure-ad-graph-api office365-restapi microsoft-graph

5
推荐指数
1
解决办法
550
查看次数