Graph API $expand does not work with transitiveMemberOf

Sumit 1 Reputation point
2022-12-05T07:53:35.523+00:00

We have a use case where we want to fetch users and their groups in a single call. For this we are using $expand with transitiveMemberOf. We understand with $expand there is a limitation where API will only return 20 groups/objects.
In our case the number of groups do not exceed this limit.

What we observe is that when we use transitiveMemberOf with $expand, it behaves like memberOf and does not return transitive/nested groups.

In the past others have reported similar issue, but there is no resolution
https://github.com/microsoftgraph/microsoft-graph-docs/issues/16118

Can the team fix the behavior of ransitiveMemberOf with $expand

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2022-12-05T10:13:33.087+00:00

    Hi @Sumit

    I can reproduce your issue, when we use transitiveMemberOf with $expand, the result is not returning transitive/nested groups. Not sure if this is an unknown bug, I recommend that you submit a user voice to feedback the issue to Microsoft.

    For now, as an alternative solution, you can try JSON batching, which allows you to combine multiple independent requests into a single HTTP call to save network latency.

    267199-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Sumit 1 Reputation point
    2022-12-09T06:45:10.823+00:00

    Hi CarlZhao-MSFT

    We have submitted https://feedbackportal.microsoft.com/feedback/idea/23223739-7374-ed11-a81b-6045bdaf6a9e

    Our rational for using $expand, is to reduce the number of API calls. JSON batching only helps to reduce network latency, but each API in the batch accounts for a separate API call which doesn't help our use case.


  3. Sumit 1 Reputation point
    2022-12-13T08:40:04.44+00:00

    Hi CarlZhao-MSFT

    Is this not a ticket request https://feedbackportal.microsoft.com/feedback/idea/23223739-7374-ed11-a81b-6045bdaf6a9e, If not can you please share link to create one

    Thanks


  4. Sumit 1 Reputation point
    2022-12-13T11:39:49.92+00:00

    Hi CarlZhao-MSFT

    Thanks for the help, have created support request with ID 2212130030001531


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.