PIVTR-D
RAzure playbook · Identity and access

Console or SSO account takeover

An attacker signs in as one of your users with a phished password or a stolen session token, then registers a multifactor authentication (MFA) method of their own. With an admin account, the attacker adds roles, consents to applications, or elevates to User Access Administrator over every subscription. Cut off the account's sessions and the attacker's MFA method first, then check what the account changed.

Look here

LogSearch for
SigninLogsNew IP addresses, countries and user agents for the user: SigninLogs | where UserPrincipalName == "<upn>" | project TimeGenerated, IPAddress, Location, AppDisplayName, ResultType, RiskLevelDuringSignIn, AuthenticationRequirement, UserAgent, SessionId
AADNonInteractiveUserSignInLogsToken refreshes from attacker addresses after the first sign-in: AADNonInteractiveUserSignInLogs | where UserPrincipalName == "<upn>" | summarize count() by IPAddress, AppDisplayName
AADUserRiskEventsRisk detections for the user, in RiskEventType, RiskLevel and RiskState
AuditLogs, methods and passwordsMFA methods and password changes: User registered security info, Admin registered security info, User deleted security info, Reset password, Change user password, Admin started password reset, Update user
AuditLogs, roles and consentRoles and app consents the account added: Add member to role, Add eligible member to role, Add scoped member to role, Consent to application
AuditLogs, elevated accessElevation to User Access Administrator at root scope, under the service Azure RBAC (Elevated Access). The entry reads: User has elevated their access to User Access Administrator for their Azure Resources
AzureActivityEverything the account did in Azure: AzureActivity | where Caller == "<upn>" | project TimeGenerated, CallerIpAddress, OperationNameValue, _ResourceId

Contain

#Item
1Disable the account. For a synced hybrid account, also disable it in on-premises Active Directory: Update-MgUser -UserId <upn> -AccountEnabled:$false
2Revoke the user's refresh tokens and session cookies: Revoke-MgUserSignInSession -UserId <upn>
3Reset the password. For a hybrid account, reset it twice in on-premises Active Directory
4List the user's authentication methods: Get-MgUserAuthenticationMethod -UserId <upn>
5Remove each method the attacker registered. For an Authenticator app method, run: Remove-MgUserAuthenticationMicrosoftAuthenticatorMethod -UserId <upn> -MicrosoftAuthenticatorAuthenticationMethodId <id>
6Mark the user compromised so ID Protection sets the user risk to high: Confirm-MgRiskyUserCompromised -UserIds <user-object-id>
7List the user's registered devices: Get-MgUserRegisteredDevice -UserId <user-object-id> -All
8Disable each of those devices: Update-MgDevice -DeviceId <id> -AccountEnabled:$false

Eradicate and recover

#Item
1Remove the roles, app consents and owners the account added in the window, using the commands in service principal credential leak
2List the delegated consents on each app the account consented to: Get-MgServicePrincipalOauth2PermissionGrant -ServicePrincipalId <sp-object-id>
3Remove the attacker's delegated consents: Remove-MgOauth2PermissionGrant -OAuth2PermissionGrantId <id>
4Check for elevated access, and remove User Access Administrator at root scope / if the attacker took it, as in the tenant compromise playbook
5Issue a Temporary Access Pass so the user registers MFA again, then re-enable the account
6Protect the Register security information user action with a Conditional Access policy that requires MFA or an authentication strength
7Require the Phishing-resistant MFA strength for admin roles
8Watch AADNonInteractiveUserSignInLogs for the attacker's addresses after recovery
Watch out
  • Revocation can take a few minutes, and access tokens already issued keep working until they expire. The default lifetime is a random value from 60 to 90 minutes, and 2 hours for clients such as Teams and Microsoft 365 in tenants without Conditional Access.
  • Clients that support continuous access evaluation (CAE) get tokens that last up to 28 hours. CAE revokes them in near real time on critical events such as account disable and password change.
  • Disabling the account alone leaves the attacker's MFA method in place for the day you re-enable it.

Microsoft Learn: revoke user access in an emergency; access token lifetime; configurable token lifetimes; continuous access evaluation; Entra audit log activity reference; elevate access for a Global Administrator; remediate risks and confirm compromised users; authentication strengths; Conditional Access user actions; Microsoft Graph PowerShell reference for the cmdlets used. Checked October 2026.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.