Graph API assigned label filtering

Ricardo Matos 0 Reputation points

Hello everyone! I'm making a graph API call the following way:{user_ID}/ownedObjects/$select=id,displayname,createdDateTime,assignedLabels&$count=true&$filter=assignedLabels/any(label : label/displayName eq 'TEST') In essence I'm trying to fetch all the groups that contain the label "Test" What I would expect to get back as a reply is this:

 "@odata.context": "$metadata#groups(id,displayName,createdDateTime,assignedLabels)",

    "value": [


            "id": "[GUID]",

            "displayName": "TEST",

            "createdDateTime": "2023-02-04T15:24:05Z",

            "assignedLabels": [


                    "labelId": "[GUID]",

                    "displayName": "TEST"




However I'm getting the following reply back:


    "error": {

        "code": "Request_UnsupportedQuery",

        "message": "Unsupported query on property 'AssignedLabel'.",

        "innerError": {

            "date": "2024-01-31T15:31:13",

            "request-id": "8f3de165-3c0b-4ff2-84ac-95f0ab042227",

            "client-request-id": "8f3de165-3c0b-4ff2-84ac-95f0ab042227"




Any idea why this filter operation is invalid? Thank you!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,963 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 90,881 Reputation points MVP

    Not every property if filterable in the Graph. Generally speaking, you should consult the documentation each time you plan to use a filter, for example the article on Group properties shows assignedLabels as not filterable:

    0 comments No comments