- Issue created by @khaled.zaidan
- 🇬🇧United Kingdom khaled.zaidan
Attached is a patch to implement the pagination.
- Status changed to Needs review
9 months ago 4:18pm 9 May 2024
The user group API endpoint has a default limit of 100 groups by request. This means that if a user has >100 user groups, we only get the first 100 and none of the rest.
We need to handle pagination to fetch the rest.
It's not practical to test with 100 user groups... these are steps to simulate the issue with fewer groups.
1. Create a user in AD with more than ~10 user groups
2. In the module config, create role mappings for all 10 user groups
2. Manually change the endpoint URL from `https://graph.microsoft.com/v1.0/me/memberOf` to `https://graph.microsoft.com/v1.0/me/memberOf?$top=5` (limiting to 5 per page) and create mappings for all
3. See how not all roles are assigned to the user when they login
Check the response for a `nextLink`, and when present, request subsequent pages.
Implementation
N/A
N/A
N/A
Active
1.0
Code
Attached is a patch to implement the pagination.