- What's in preview: Microsoft Entra Privileged Identity Management is adding privileged session monitoring and session recordings, Security Copilot-driven least-privilege role recommendations at activation time, a PIM-only mode to block out-of-band role assignments, and bulk tools to reduce standing access.
- Why it matters now: None of these controls help if admins still hold permanent active roles. Session monitoring and AI recommendations only fire on PIM activations—standing Global Administrators bypass them entirely.
- First step (live-tested): Run the Graph PowerShell audit below to split every directory role assignment into Permanent Active, Time-bound Active and Eligible, flag privileged roles and service principals, and produce a conversion backlog before enabling PIM-only mode.
At Ignite 2026, Microsoft announced a substantial expansion of Microsoft Entra Privileged Identity Management (PIM), now rolling out in public preview. The headline features—session monitoring and recordings, AI-based least-privilege recommendations through Microsoft Security Copilot, and PIM-only mode—all share one prerequisite: your privileged roles must actually flow through PIM activation.
In our own LAB 365 dev tenant, the audit below found 18 permanent active role assignments against only 13 eligible ones, including six permanent Global Administrators, two service principals holding permanent Exchange directory roles, and two role-assignable groups with standing admin roles. That is typical of most tenants—and exactly the gap this runbook closes.
For PIM on application roles and AI agent identities (Graph appRoleAssignments), see our companion guide: Enhanced Entra PIM for Application Roles & AI Agent Identities.
Architecture: From Standing Access to Monitored Just-in-Time Elevation
1. What's New in the Entra PIM Preview Wave
| Capability | What it does | Prerequisite you must fix first |
|---|---|---|
| Privileged session monitoring & recordings | Lets security teams watch and review what happened during an elevated session, including JIT connections to Azure / Azure Arc VMs from My Access. | Admins must elevate through PIM—permanent roles produce no session to monitor. |
| AI least-privilege recommendations (Security Copilot) | At activation, Copilot reads the justification (e.g. "read the activity logs") and suggests a narrower role; admins can allow users to activate a subset role under a broader eligibility. | Eligible (not active) assignments, and good justification hygiene. |
| PIM-only mode | Blocks role assignments made outside PIM so drift can't reappear. | Clean baseline—otherwise legitimate automation breaks on day one. |
| Bulk standing-access reduction | Convert many permanent assignments at scale. | An accurate inventory (the script below). |
2. Live-Tested Audit: Permanent vs Time-bound vs Eligible Role Assignments
This script uses only Microsoft Graph REST via Invoke-MgGraphRequest, so it works with the base Microsoft.Graph.Authentication module. It requires RoleManagement.Read.Directory (or RoleManagement.ReadWrite.Directory) and was tested app-only with certificate auth against the LAB 365 tenant.
#Requires -Modules Microsoft.Graph.Authentication
<#
.SYNOPSIS
Classifies every Entra directory role assignment as Permanent Active, Time-bound Active,
or Eligible, and flags privileged roles and service principals for PIM conversion.
#>
param(
[string]$ClientId,
[string]$TenantId,
[string]$CertificateThumbprint,
[string]$OutputCsv = ".\Entra-PIM-Standing-Access-$(Get-Date -Format 'yyyyMMdd').csv"
)
if ($ClientId -and $TenantId -and $CertificateThumbprint) {
Connect-MgGraph -ClientId $ClientId -TenantId $TenantId -CertificateThumbprint $CertificateThumbprint -NoWelcome
} else {
Connect-MgGraph -Scopes "RoleManagement.Read.Directory" -NoWelcome
}
function Get-GraphAll([string]$Uri) {
$items = [System.Collections.Generic.List[object]]::new()
while ($Uri) {
$page = Invoke-MgGraphRequest -Method GET -Uri $Uri -OutputType PSObject
$page.value | ForEach-Object { $items.Add($_) }
$Uri = $page.'@odata.nextLink'
}
return $items
}
# Tier-0 / high-impact roles to prioritise (extend for your tenant)
$PrivilegedRoles = @(
"Global Administrator", "Privileged Role Administrator", "Privileged Authentication Administrator",
"Security Administrator", "Conditional Access Administrator", "Exchange Administrator",
"SharePoint Administrator", "User Administrator", "Application Administrator",
"Cloud Application Administrator", "Hybrid Identity Administrator", "Intune Administrator",
"Authentication Administrator", "Helpdesk Administrator", "Exchange Recipient Administrator"
)
$RoleNames = @{}
Get-GraphAll "https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions?`$select=id,displayName" |
ForEach-Object { $RoleNames[$_.id] = $_.displayName }
$Active = Get-GraphAll "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentScheduleInstances?`$expand=principal"
$Eligible = Get-GraphAll "https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleInstances?`$expand=principal"
$Report = foreach ($a in $Active) {
$role = $RoleNames[$a.roleDefinitionId]
[PSCustomObject]@{
Role = $role
Privileged = $PrivilegedRoles -contains $role
Principal = $a.principal.displayName
PrincipalType = ($a.principal.'@odata.type' -replace '#microsoft.graph.', '')
State = if ($a.assignmentType -eq 'Activated') { 'Activated (JIT)' }
elseif (-not $a.endDateTime) { 'Permanent Active' }
else { 'Time-bound Active' }
MemberType = $a.memberType
EndDateTime = $a.endDateTime
Scope = $a.directoryScopeId
}
}
$Report += foreach ($e in $Eligible) {
$role = $RoleNames[$e.roleDefinitionId]
[PSCustomObject]@{
Role = $role
Privileged = $PrivilegedRoles -contains $role
Principal = $e.principal.displayName
PrincipalType = ($e.principal.'@odata.type' -replace '#microsoft.graph.', '')
State = 'Eligible'
MemberType = $e.memberType
EndDateTime = $e.endDateTime
Scope = $e.directoryScopeId
}
}
$Report | Sort-Object Privileged, State -Descending | Export-Csv $OutputCsv -NoTypeInformation -Encoding UTF8
Write-Host "`n=== PIM Readiness Summary ===" -ForegroundColor Cyan
$Report | Group-Object State | Select-Object Name, Count | Format-Table -AutoSize
Write-Host "Permanent privileged assignments (conversion backlog):" -ForegroundColor Yellow
$Report | Where-Object { $_.State -eq 'Permanent Active' -and $_.Privileged } |
Format-Table Role, Principal, PrincipalType -AutoSize
Sample output from the LAB 365 tenant (names abbreviated):
=== PIM Readiness Summary ===
Name Count
---- -----
Permanent Active 18
Eligible 13
Permanent privileged assignments (conversion backlog):
Role Principal PrincipalType
---- --------- -------------
Exchange Recipient Administrator EXO-FunctionApp servicePrincipal
Global Administrator (6 user accounts) user
Exchange Administrator LAB365-Dev-Automation servicePrincipal
Exchange Recipient Administrator Messaging Team L2 group
Helpdesk Administrator ROL-APAC-Helpdesk-Admins group
Groups: Role-assignable groups with permanent roles can be onboarded to PIM for Groups, so membership itself becomes eligible and time-bound.
Note: Service principals cannot activate PIM roles interactively. For automation identities like EXO-FunctionApp, replace the directory role with a scoped Exchange RBAC for Applications assignment or a least-privileged Graph application permission instead of converting it to eligible.
3. Converting a Permanent Assignment to Eligible (Graph)
After you've confirmed which accounts must stay permanent (normally two cloud-only break-glass accounts excluded from Conditional Access and monitored by alerts), convert the rest. Create the eligibility first, then remove the active assignment:
$PrincipalId = "<user-object-id>"
$RoleId = "62e90394-69f5-4237-9190-012177145e10" # Global Administrator template ID
# 1. Create a 180-day eligible assignment
$eligibleBody = @{
action = "adminAssign"
justification = "PIM conversion - CAB-2026-1204"
roleDefinitionId = $RoleId
directoryScopeId = "/"
principalId = $PrincipalId
scheduleInfo = @{
startDateTime = (Get-Date).ToUniversalTime().ToString("o")
expiration = @{ type = "afterDuration"; duration = "P180D" }
}
} | ConvertTo-Json -Depth 5
Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleRequests" -Body $eligibleBody
# 2. Remove the permanent active assignment
$removeBody = @{
action = "adminRemove"
justification = "PIM conversion - CAB-2026-1204"
roleDefinitionId = $RoleId
directoryScopeId = "/"
principalId = $PrincipalId
} | ConvertTo-Json
Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentScheduleRequests" -Body $removeBody
Safety: Always run step 1 and verify the eligibility appears in Entra admin center → ID Governance → Privileged Identity Management → My roles for the target user before running step 2. Never convert your last permanent Global Administrator.
4. Rollout Checklist for the Preview Features
- Configure role settings for Tier-0 roles: require MFA (or an authentication strength such as phishing-resistant passkeys), justification, approval, and a maximum activation of 1–4 hours.
- Pilot session monitoring on a small set of Azure / Azure Arc VMs reached through My Access before widening scope.
- Enable "Allow least-privilege role activation" only for roles where a subset role makes sense (for example, Owner → Reader for log review). Review Copilot's suggestions against your own RBAC model.
- Turn on PIM-only mode last, after the audit shows zero unexpected permanent assignments and automation has moved to app permissions.
- Re-run the audit weekly (Azure Automation with certificate auth) and alert on any new
Permanent Activeprivileged row.
Related LAB 365 Guides
- Enhanced Entra PIM for Application Roles & AI Agent Identities
- M365 Admin Handbook Ch. 3: Zero Trust, Conditional Access, Passkeys & PIM
- Entra ID Conditional Access Policy Plans Governance Guide
References & Official Microsoft Documentation
- What is Microsoft Entra Privileged Identity Management?
- List roleAssignmentScheduleInstances — Microsoft Graph v1.0
- List roleEligibilityScheduleInstances — Microsoft Graph v1.0
- Create roleEligibilityScheduleRequest — Microsoft Graph v1.0
- Manage emergency access (break-glass) accounts in Microsoft Entra ID
- Microsoft Entra built-in roles (role template IDs)
đź’¬ Reader Comments & Feedback
Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.
Leave a Comment or Report an Update