Trying to get all the Office 365 groups a user is a member of.
I've registered a 'Native client application' on Azure and selected only one permission: 'Read all groups' under the 'Microsoft Graph' scope.
The problem: users from other tenants got the 'Calling principal cannot consent due to lack of permissions.' error, and did not get to the consent step.
If the user has admin rights or if I register another app on a second tenant, I was able to pass the consent step and also got the groups list.
BTW, registering a 'Web application' and selecting 'Yes' in the Multi-tenant option didn't help either.
Does anybody know if 'Group.Read.All' requires admin consent? According to this it doesn't.
I also tried to run this query https://graph.microsoft.com/v1.0/me/memberOf/$/microsoft.graph.group?$filter=groupTypes/any(a:a%20eq%20'unified')
as mentioned here under 'GET unified groups I’m member of', but with no luck.
Another question, is there a way to configure the Native app as a multi-tenant app?