Graph ODATA $filter startswith 函数不适用于 Sharepoint 中的列表项 [英] Graph ODATA $filter startswith function does not work with List Items in Sharepoint

查看:60
本文介绍了Graph ODATA $filter startswith 函数不适用于 Sharepoint 中的列表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在图形资源管理器中,我尝试使用过滤器对列表项执行 OData 查询.所有的 OData 过滤器都从我试图返回 itemNotFound 错误的函数开始.请参阅下面的示例https://graph.microsoft.com/v1.0/sites/root/列表('Documents')/Items?$filter=startswith(webURL, 'https') eq true

In graph explorer, I am trying to execute OData queries with the filter startswith on list items. All of the OData filter startswith functions I tried to return itemNotFound error. See an example below https://graph.microsoft.com/v1.0/sites/root/lists('Documents')/Items?$filter=startswith(webURL, 'https') eq true

图形浏览器具有 Sites.ReadWrite.All 范围.

Graph explorer has Sites.ReadWrite.All scope.

有人可以向我指出有关 Microsoft Graph 支持的 OData 功能范围的任何文档吗?

Can someone point me to any documentation on the extent of OData features supported in Microsoft Graph?

推荐答案

SharePoint List API(和驱动器上的图形 API/OneDrive API)不支持过滤或排序结果.您可能知道,SharePoint 文档和 OneDrive 都可以通过 Drive api 访问.当 Microsoft Graph 看到一个它不期望的查询参数时,它会简单地忽略未知的过滤器参数并向我们返回一个未过滤的结果.驱动器 api 支持 $expand、$select、$skipToken、$top 和 $orderby(orderby 在我这边不起作用)OData 查询参数来自定义响应.

SharePoint List API (and Graph API on drives/OneDrive API) do not support filtering or ordering results. As you may know, both SharePoint Document and OneDrive can be accessed by the Drive api. When Microsoft Graph sees a query parameter it doesn't expect, it simply ignoring the unknown filter parameter and returning us an unfiltered result. The drives api supports the $expand, $select, $skipToken, $top, and $orderby(orderby does not work on my side) OData query parameters to customize the response.

目前可用的文档状态:

对 $filter 运算符的支持因 Microsoft Graph API 而异.

Support for $filter operators varies across Microsoft Graph APIs.

varies 这个词可能是因为 Graph 中的所有产品并不完全支持这些选项.

The word varies might be the inference that these options are not totally supported across all products in Graph.

这篇关于Graph ODATA $filter startswith 函数不适用于 Sharepoint 中的列表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆