I would like to list all users. For each user, I need to display the roles and groups specific to that user.
I tried:
https://graph.microsoft.com/v1.0/users?$expand=memberOf
But it gives exactly the same result as:
https://graph.microsoft.com/v1.0/users
According to the doc for the user object (http://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/user), I should be able to list the roles and groups for the user by using the memberOf relationship.
I can get the roles and groups I need for every user by doing one request per user (using https://graph.microsoft.com/v1.0/users/{user_id}/getMemberObjects
) but it's a bit slow and overkill.
What am I missing?