Can transitive member /microsoft.graph.group return a group correctly.

Rob Allen 1 Reputation point
2021-06-22T18:48:08.473+00:00

As per my github doc request. https://github.com/microsoftgraph/microsoft-graph-docs/issues/11881

I see that https://graph.microsoft.com/v1.0/groups/{id}/transitiveMembers/microsoft.graph.user returns users but
https://graph.microsoft.com/v1.0/groups/{id}/transitiveMembers/microsoft.graph.group does not return group, it just returns a bad request. This is inconsitient with the /groups/{id}/members endpoint.

In this case I am only trying to return transitiveMembers that are groups, but i cannot find a filter that works. The github reviewer has re produced this and marked it as a bug.

Where do I submit this as it is a legitimate issue that was holding a project i was on ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,248 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,816 Reputation points Microsoft Employee
    2021-06-24T09:54:34.953+00:00

    After checking this out a lot longer, I arrived at the following which may be normal behavior and not a bug actually. Try it and see if it works for you.

    When calling GET https://graph.microsoft.com/v1.0/groups/group-id/transitivemembers/microsoft.graph.{entity}, you have to include the request header ConsistencyLevel=eventual then add a count operation to the request. Below is a curl for getting user transitive members and groups too.

    The curl to list groups that are members.

    curl --location --request GET 'https://graph.microsoft.com/v1.0/groupsgroup-id/transitivemembers/microsoft.graph.group?$count=true' \
    --header 'ConsistencyLevel: eventual' \
    --header 'Authorization: Bearer eyJ0...'
    

    The curl to list users that are members.

    url --location --request GET 'https://graph.microsoft.com/v1.0/groups/group-id/transitivemembers/microsoft.graph.user?$count=true' \
    --header 'ConsistencyLevel: eventual' \
    --header 'Authorization: Bearer eyJ0e...'
    
    1 person found this answer helpful.
    0 comments No comments