Fetch Microsoft Entra built-in roles

Glenn Maxwell 13,981 Reputation points
2026-06-30T05:11:32.27+00:00

Hi All,

I am trying to retrieve all Microsoft Entra built-in roles using the Microsoft Graph API. I am able to retrieve the directory roles to some extent.

My requirement is to retrieve the PIM assignments for these Entra roles, specifically:

  • Active role assignments
  • Eligible role assignments
  • Expired role assignments (if available)

Are there any Microsoft Graph APIs that can be used to retrieve this information for Microsoft Entra roles?

I have been referring to the following documentation:

https://graph.microsoft.com/v1.0/$batch

https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference

https://learn.microsoft.com/en-us/graph/api/directoryrole-list?view=graph-rest-1.0&tabs=http

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

Answer accepted by question author

JimmySalian-2011 45,531 Reputation points Volunteer Moderator
2026-06-30T08:47:24.4366667+00:00

Hi Glen,

Did you check this link - https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/view-assignments?tabs=admin-center

The GraphAPI will rquire some customisation as per the requireement but feel free to have a go.

Hope this helps.

JS

==

Please Accept the answer if the information helped you. This will help us and others in the community as well.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.