小编egg*_*m0n的帖子

office365微软图全文搜索

Microsoft Graph是否在v1.0或beta版中提供任何全文搜索功能?

具体来说,我想搜索电子邮件正文内容.我尝试了以下请求,只是为了测试API的不同部分:

https://graph.microsoft.com/v1.0/me/messages?$filter=body/content eq 'test'
Run Code Online (Sandbox Code Playgroud)

与响应消息

The property 'Body' does not support filtering.
Run Code Online (Sandbox Code Playgroud)

并要求

https://graph.microsoft.com/v1.0/me/messages?$filter=startswith(subject,'test') 
Run Code Online (Sandbox Code Playgroud)

与响应消息

'contains' and 'startswith' are not supported for filtering.  Use Search instead.
Run Code Online (Sandbox Code Playgroud)

最后一个响应提到了一些搜索功能,但我在文档中找不到这个.

rest office365 microsoft-graph

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

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
查看次数