Audit Entra Privileged Roles: Active, Eligible and Group Access
Export active directory-role assignments with their principal, role and scope, then review PIM eligibility and group-based access separately. A list of directly assigned users is not a complete account of who can become an administrator.
On this page
Key Takeaways
- An assignment connects a principal, role and scope; the principal is not necessarily a user.
- Active role assignments and eligible PIM access are different evidence sets.
- Preserve assignment IDs and unresolved principals instead of silently dropping rows.
A privileged-access review should explain who has access, what they can administer, how they obtained it and whether the access is still justified. A spreadsheet containing only display names cannot answer those questions reliably.
Documentation reviewed on 18 October 2026. The PowerShell example passed offline syntax and mocked-response checks. It was not executed against a live tenant; confirm permissions and output in an authorized pilot.
1. Start with the native role assignment export
In the Microsoft Entra admin center, open Entra ID → Roles & admins. Inspect assignments for a role or use All roles → Download assignments for the active-assignment export. The PIM interface can present an Export action instead. Microsoft’s role-assignment guide documents these paths and the distinction between tenant, application and administrative-unit scopes.
Preserve the export time and scope. If you inspect only Global Administrator, label the output accordingly; it is not an inventory of all privileged roles. A principal can be a user, group or service principal, so leave identity resolution visible as a separate review step.
2. Export assignments with role names and scope
The directory role-assignment API documents RoleManagement.Read.Directory for this read. For delegated access, the account also needs a supported directory role, such as Directory Readers or Global Reader. Use approved read access rather than a write-capable scope.
Use PowerShell 7 with the Microsoft Graph Authentication and Identity Governance modules installed. The Graph PowerShell assignment cmdlet supports -All. This example uses it on both collections, resolves role definitions locally, and retains each assignment as its own row.
param([string]$OutputPath = './Entra-Active-Role-Assignments.csv')
$ErrorActionPreference = 'Stop'
Connect-MgGraph -Scopes 'RoleManagement.Read.Directory' -ContextScope Process -NoWelcome
try {
$definitions = @(Get-MgRoleManagementDirectoryRoleDefinition -All -ErrorAction Stop)
$assignments = @(Get-MgRoleManagementDirectoryRoleAssignment -All -ErrorAction Stop)
if ($assignments.Count -eq 0) {
throw 'No assignments returned. Confirm tenant, permissions and scope before concluding no access exists.'
}
$names = @{}
foreach ($definition in $definitions) {
$names[$definition.Id] = $definition.DisplayName
}
$assignments | Select-Object Id, PrincipalId, RoleDefinitionId,
@{Name='RoleName'; Expression={
if ($names.ContainsKey($_.RoleDefinitionId)) { $names[$_.RoleDefinitionId] }
else { 'Unresolved role definition - review by ID' }
}}, DirectoryScopeId, AppScopeId |
Export-Csv -LiteralPath $OutputPath -NoTypeInformation -Encoding utf8 -NoClobber
}
finally {
Disconnect-MgGraph -ErrorAction SilentlyContinue | Out-Null
}
All Microsoft operations here are reads. The script writes one local CSV, refuses an existing filename and stops if a collection request fails. It retains unresolved role IDs and does not collapse multiple assignments belonging to one principal. Large collections are held in memory; this is a review export, not a streaming collection service.
It deliberately does not resolve principal names, expand group membership or infer eligibility. Those additional reads have their own permissions and scope. Inspect object IDs in the directory, identify the principal type, and record unresolved objects explicitly. Import identifier and name fields as text when opening CSV evidence in a spreadsheet.
| Evidence column | Review use |
|---|---|
Id | Distinguish separate assignments and reconcile exports |
PrincipalId | Resolve the user, group or service principal |
RoleDefinitionId / RoleName | Establish which role was granted, including custom roles |
DirectoryScopeId | Preserve the directory resource scope; / denotes tenant scope |
AppScopeId | Preserve any application-specific scope for review |
For example, two rows for the same principal at different scopes are not duplicates to delete. Conversely, repeated assignment IDs merit investigation before using row counts as a metric. Neither pattern is itself evidence that privileges are malicious.
3. Review PIM eligibility and active schedule instances separately
Microsoft documents PIM licensing separately, including Entra ID P2 or Entra ID Governance requirements. The ordinary assignment export is not a way to bypass those requirements.
For an appropriately licensed and authorized PIM review, use these distinct evidence surfaces:
| Evidence | Graph collection | Endpoint-specific least-privileged read scope |
|---|---|---|
| Eligible assignments | roleEligibilityScheduleInstances | RoleEligibilitySchedule.Read.Directory |
| Active assignment instances | roleAssignmentScheduleInstances | RoleAssignmentSchedule.Read.Directory |
The eligibility endpoint records eligibility instances. The active-instance endpoint includes active assignments created through assignment and activation requests and the role assignments API. Both also require a supported role for delegated reads; Global Reader is one documented option. Existing broader read scopes may cover these operations, so review your current consent before requesting anything additional.
Keep principal, role, scope, validity times and assignment type in the evidence. Do not add active-instance rows to ordinary assignment rows as if they were independent grants. Reconcile their identifiers and context. For raw REST collection, follow Microsoft’s paging guidance through returned @odata.nextLink URLs; the first response alone may be incomplete.
4. Follow group-based paths to the people who can use them
Microsoft supports role-assignable groups. When the assignment principal is a group, review membership and the group’s administration process; if PIM for Groups is used, include eligible membership in the review scope. A flat role-assignment export does not expand these paths into an effective-access report for every person.
Separate three counts in the management summary: assignment records, distinct principal objects and resolved human administrators. Mark unresolved paths as evidence gaps. Also keep service-principal privileges separate from human MFA checks: an application identity is not a person who can register an authenticator.
5. Record a decision and verify the result
For each access path, record a business owner, justification, necessary scope, expiration or review date, and proposed action. A useful decision table is:
| Decision | Evidence to retain |
|---|---|
| Keep | Current duty, approved role/scope and next review date |
| Reduce or time-limit | Proposed narrower scope or activation model and dependency checks |
| Remove | Owner approval, change reference and post-change verification |
| Investigate | Unresolved principal, unexpected scope or missing approval |
Review emergency-access arrangements and service dependencies before making changes. Cross-reference human administrators with the MFA review, but do not treat registration alone as enforcement. Preserve before/after evidence and repeat the collection after an approved change.
This guide covers Entra directory roles. It does not inventory all Azure resource RBAC, Exchange workload roles, application permissions or permissions granted inside third-party systems.
Make recurring evidence useful
Use a consistent export structure and review schedule so the next reviewer can explain each change. SysClaw Community offers a local reporting and administration workspace; verify the supported role views against your required scope. Paid capabilities add posture, automation and multi-tenant workflows, but no edition replaces Microsoft entitlements or the reviewer’s approval process.
References
Frequently Asked Questions
Does an active-role export include every eligible PIM administrator?
No. Collect eligibility separately and preserve activation and validity context. Eligibility does not mean that the role is currently active.
Can a group appear instead of an administrator in the report?
Yes. A role assignment can target a group. Review the group's relevant membership and eligibility paths separately; do not count the group as one human administrator.
Can I remove roles directly from this report?
The example only reads assignments. Obtain an owner-approved decision, check emergency access and automation dependencies, and verify the intended scope before changing privileges.
More Microsoft 365 Auditing Guides
All guides →Related Resources
- Find MFA registration gaps →
Review authentication evidence for privileged identities without confusing registration with enforcement.
- Read-only Microsoft 365 tenant checks →
Extend your review to app permissions, forwarding and guest accounts.
- SysClaw Community capabilities →
Explore local reporting, auditing and administration.
Try it on your own tenant
SysClaw Community Edition runs these checks and keeps the results on your machine — free forever for one tenant and one operator.