如何在 Microsoft Graph API 中筛选 Sharepoint 条款?

How to filter Sharepoint Terms in Microsoft Graph API?

如何使用 Microsoft Graph API 按名称过滤 Sharepoint 条款?

以下是不带过滤器的请求返回的结果示例:

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#termStore/groups('xxxxxxxxx')/sets('xxxxxx')/terms",
    "value": [
        {
            "id": "fb0d9476-4cec-46d5-acd5-12245de95308",
            "createdDateTime": "2017-06-28T15:07:44.18Z",
            "lastModifiedDateTime": "2021-03-12T11:31:36.137Z",
            "labels": [
                {
                    "name": "Hello",
                    "isDefault": true,
                    "languageTag": "en-US"
                }
            ],
            "descriptions": []
        },

我试过这样过滤:

但任何请求都有效(Invalid filter clauseParsing OData Select and Expand failed: Property 'labels' on type 'microsoft.graph.termStore.term' is not a navigation property or complex property. Only navigation properties can be expanded.)。

感谢您的帮助!

您应该使用如下过滤器:

?$filter=labels/any(s:s/name eq 'Hello')