- Issue created by @eduardo.arana
- Status changed to Closed: duplicate
about 2 years ago 8:49pm 30 June 2023 - 🇩🇪Germany webflo
Hi, I have committed the patch from issue ✨ Support paginated group results Fixed . It should fix this issue without an limit.
By default, https://graph.microsoft.com/v1.0/me/memberOf displays only the first 100 groups to which the logged-in user belongs. If the user belongs to more than 100 groups, manually assigned roles (role|group) will not be set for the user, and only the authenticated role will be used. The API can retrieve up to 999 groups the user belongs to by using the $top=999 parameter, which can help extend this limit effectively.
Test it with users that belong to more than 100 groups.
To bypass the 100 default values, and add a logic to, show the max groups allowed by the API (999) is described below.
From:
case 2:
$uri = 'https://graph.microsoft.com/v1.0/me/memberOf';
break;
To:
case 2:
$uri = 'https://graph.microsoft.com/v1.0/me/memberOf?$top=999';
break;
Adding the patch file to this issue.
Closed: duplicate
2.0
Code
Hi, I have committed the patch from issue ✨ Support paginated group results Fixed . It should fix this issue without an limit.