A cloud-based identity and access management service for securing user authentication and resource access
Hello Carolyne-3676
There is no direct API in Microsoft Graph API to retrieve all eligible groups for another user using only principalId. This is by design.
Since group IDs are required, you must reverse the lookup:
- Get all PIM-enabled groups (or all groups if needed)
- Query eligibility per group + user:
-Filter "principalId eq '<user-id>' and groupId eq '<group-id>'"
Maintain or retrieve a list of PIM-enabled groups only (not all groups)
- Loop through those groups for each user
- This is the only scalable and supported method
Let me know if any further queries - feel free to reach out!
Hello Carolyne-3676 If the resolution was helpful, kindly take a moment to click on
and click on Yes for was this answer helpful. And, if you have any further query do let us know.