如何通过SharePoint Online中的Microsoft Graph按文档ID进行筛选?

时间:2019-11-26 12:24:59

标签: microsoft-graph sharepoint-online

我需要通过SharePoint Online网站集中的文档ID检索项目。网站集已配置为使用SharePoint文档ID,如下所述:

https://support.office.com/en-us/article/Activate-and-configure-Document-IDs-in-a-site-collection-66345c77-f079-4104-ac7a-e25826849306

我可以通过Microsoft Graph Explorer将文档ID视为字段/ _dlc_DocIdUrl /描述:

查询:

https://graph.microsoft.com/v1.0/sites/{siteId}/drive/list/items?$expand=Fields($select=_dlc_DocIdUrl)

部分结果:

      "fields": {
            "@odata.etag": "\"xxxxx\"",
            "_dlc_DocIdUrl": {
                "Description": "xxxxx-1338141808-1",
                "Url": "xxx"
            }
        }

但是当我尝试通过Microsoft Graph Explorer按属性进行过滤时,我得到一个错误:

https://graph.microsoft.com/v1.0/sites/{siteId}/drive/list/items?$filter=Fields/_dlc_DocIdUrl/Description eq 'xxxxx-1050899592-3'


{
"error": {
    "code": "generalException",
    "message": "An unspecified error has occurred.",
    "innerError": {
        "request-id": "xxx",
        "date": "xxx"
    }
}}

如果我通过列表ID进行过滤,也会出现相同的错误:

https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{listId}/items?$filter=Fields/_dlc_DocIdUrl/Description eq 'xxxxx-1050899592-2'

有人知道如何解决过滤器语句吗?还是有人知道通过文档ID检索项目的另一种方法?预先感谢您的帮助。

0 个答案:

没有答案