skip to Main Content

Performing the following HTTP request to the Microsoft Graph API:

GET https://graph.microsoft.com/v1.0/groups/{id}/members?$count=true&$filter=startswith(displayName, 'a')
ConsistencyLevel: eventual

Results in the following response when querying users for an Azure B2C tenant:

{
    "error": {
        "code":"Request_UnsupportedQuery",
        "message":"The specified filter to the reference property query is currently not supported.",
        "innerError":{
            "date":"2022-12-11T18:02:40",
            "request-id":"50ddfd29-3937-4bff-b84e-121a33149996",
            "client-request-id":"50ddfd29-3937-4bff-b84e-121a33149996"
        }
    }
}

According to this Microsoft documentation article, the $count query parameter and the ConsistencyLevel header and $count are referred to as advanced query parameters. According to the same article, the advanced query capabilities are currently not available for Azure AD B2C tenants.

My question is how can I use $filter and perform other queries on members of a group using the MS Graph API on an Azure B2C tenant?

I can perform the same query on the /users endpoint with no issue, because it does not require the ConsistencyLevel header or the $count query parameter.

2

Answers


  1. Microsoft Graph allows you to manage resources in your Azure AD B2C directory. The following Microsoft Graph API operations are supported for the management of Azure AD B2C resources, including users, identity providers, user flows, custom policies, and policy keys. Each link in the following sections targets the corresponding page within the Microsoft Graph API reference for that operation.

    There is no supportability for group management in Azure AD B2C , please check the list of supportability.

    Screenshot 1

    enter image description here

    As you said the same query in /users endpoint worked , because its supported and doesn’t required ConsistencyLevel header .You can see the list to query for users endpoint (Screenshot 1).

    Hope this will helps

    Thanks

    Login or Signup to reply.
  2. I tried to reproduce the same in my environment and got the same error as below:

    enter image description here

    When I ran the same query in Azure AD Tenant, I got the results successfully:

    enter image description here

    Note that: $count parameter is currently not available in Azure AD B2C tenants and the advance query you are trying to achieve is also not supported as Azure AD B2C doesn’t support group management.

    You can get the members of the Azure AD B2C Group by running the below query:

    GET
    https://graph.microsoft.com/v1.0/groups/GroupID/members?$select=displayName
    

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search