question

RobAllen-5671 avatar image
0 Votes"
RobAllen-5671 asked Danstan-MSFT edited

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

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-groups
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @RobAllen-5671 we are looking in to this.

0 Votes 0 ·

1 Answer

Danstan-MSFT avatar image
1 Vote"
Danstan-MSFT answered Danstan-MSFT edited

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...'




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.