To find PIM role activations in Microsoft Entra ID, read the audit log for the activity Add member to role completed (PIM activation) in the RoleManagement category: each entry is 1 person turning an eligible role on, with who did it and when. PIM's audit history covers the past 30 days, and PIM needs Microsoft Entra ID P2 or Microsoft Entra ID Governance.
| Method | Best fit |
|---|---|
| PowerShell | A CSV of the last 30 days of activations, with who, which role and the reason. |
| Admin centre | A look at the recent PIM history for Microsoft Entra roles. |
| Altivane | Recommended for weekly reviews, with each week's activations kept in a workbook. |
Before you start
Use an account in the Global Reader, Security Reader or Security Administrator role, which can read both the audit log and PIM's own history; Reports Reader can read the audit log too. The PowerShell example requests AuditLog.; your organisation may require administrator consent.
Know what is logged. 1 activation writes several entries: the request, the approval where the role needs one, and the completion, when the role was actually added. This guide reads the completion. Activations of groups and of Azure resource roles are logged under other categories. The examples read and export; they don't activate, approve or remove any role.
Option 1
Find PIM role activations with PowerShell
Install the modules once, then connect and export the completed activations of the last 30 days. The date and activity filter runs in Microsoft Graph, so only those entries come back.
# Install once, if the modules are not already installed.
Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.Reports -Scope CurrentUser$ErrorActionPreference = 'Stop'
$days = 30
$since = (Get-Date).ToUniversalTime().AddDays(-$days).ToString('yyyy-MM-ddTHH:mm:ssZ')
$activity = 'Add member to role completed (PIM activation)'
Connect-MgGraph -Scopes 'AuditLog.Read.All' -NoWelcome
try {
$filter = "activityDateTime ge $since and activityDisplayName eq '$activity'"
$entries = @(Get-MgAuditLogDirectoryAudit -All -Filter $filter)
$entries = @($entries | Where-Object { $_.Category -eq 'RoleManagement' })
$report = @($entries | Sort-Object ActivityDateTime -Descending | ForEach-Object {
[pscustomobject]@{
When = $_.ActivityDateTime
Person = $_.InitiatedBy.User.UserPrincipalName
Targets = @($_.TargetResources.DisplayName | Where-Object { $_ }) -join '; '
Reason = $_.ResultReason
Result = $_.Result
}
})
if ($report.Count -eq 0) {
Write-Output "No PIM role activation completed in the last $days days."
} else {
$report | Export-Csv -Path './pim-role-activations.csv' -NoTypeInformation -Encoding utf8
$people = @($report.Person | Sort-Object -Unique).Count
Write-Output "$($report.Count) role activations by $people people in $days days."
}
} finally {
Disconnect-MgGraph | Out-Null
}Person is the account that activated the role, Targets names what the entry records, the role among them, and Reason is the status reason PIM logged. Where a role needs approval, the approver shows on a separate entry, Add member to role request approved (PIM activation). Times are in UTC. To keep more than 30 days, run the script on a schedule and keep each CSV.
Option 2
Review PIM activations in the admin centre
- Sign in to the Microsoft Entra admin centre as at least a Security Reader.
- Go to ID Governance > Privileged Identity Management > Microsoft Entra roles.
- Select Resource audit, then filter the history to a predefined date or a custom range.
- Read the entries for role activations. For the full entry, go to Entra ID > Monitoring & health > Audit logs and use the Service filter to show only Privileged Identity Management.
- Leave without changing any assignment or setting.
This suits a quick look at who activated what this week. The history covers 30 days and isn't kept beyond that, so for a record you can keep, use PowerShell or a report.
Option 3 ยท Recommended for weekly reviews
Report on PIM role activations with Altivane
- Open Altivane and choose the tenant.
- Run the Entra ID Audit Log report. It reads the last 7 days and needs certificate sign-in.
- Open the tenant's Excel workbook, find Entra ID audit log and filter its Activity column to Add member to role completed (PIM activation): each activation with when it happened, the result, who activated in By and the role among the Target names.
- To see who holds a role through an activation now, build the tenant's documents with the Directory Roles and PIM scorecard report in full and read Directory Role Assignments for the rows marked Active (PIM activated), with when each ends.
Altivane reads the last 7 days of the same log, so a run every 7 days keeps every week in the workbook after the log has rolled past it. A week with more than 20,000 entries is cut to the newest 20,000 and the report says it is partial. Privileged People in the same build gives each person's active and eligible roles, so an activation can be checked against what the person may hold.
Contact usCommon questions
How do I keep activations for longer than 30 days?
Send the Entra audit logs through diagnostic settings in Azure Monitor to an Azure storage account or a Log Analytics workspace. Otherwise, export them before the days fall out of the log.
Where are the activations of groups and Azure roles?
They use the same activity names under the GroupManagement and ResourceManagement categories. To include them, remove the line of the script that keeps only RoleManagement. For Azure roles, PIM also has a Resource audit for each resource under Azure resources.
Who can activate a role in the first place?
Anyone with an eligible assignment to it, directly or through a group. To list them with the active and permanent assignments, see how to list admin role assignments.
Microsoft references
Technical references checked on 7 November 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.