Fix Admin Locked Out After MFA Enforcement in Microsoft 365
A Microsoft 365 admin lockout after MFA enforcement is not a normal help desk ticket. It usually means a Conditional Access policy, security defaults change, authentication strength rollout, or MFA registration requirement now blocks the same administrators who need to fix it.
The panic symptom is simple: the admin can still enter a password, but cannot complete sign-in to the Microsoft 365 admin center, Microsoft Entra admin center, Intune admin center, Exchange admin center, or Graph PowerShell. The sign-in prompt may require an unavailable MFA method, a compliant device the admin does not have, a hybrid joined device, a trusted location, or a phishing-resistant method that was never registered.
This runbook focuses on getting control back without making the outage wider.
Quick Fix checklist
Use this order during an active lockout:
- Try every existing Global Administrator and Privileged Role Administrator account from a known good network.
- Use a documented emergency access account if one exists.
- Check whether the block is from Conditional Access, security defaults, per-user MFA, authentication methods, or Privileged Identity Management activation.
- If one admin can sign in, immediately exclude the emergency account group from the blocking policy, not all users.
- Move the suspect Conditional Access policy to report-only or disable it only long enough to restore admin access.
- Confirm sign-in logs show the exact policy result before changing multiple policies.
- Register or repair MFA methods for admin accounts while the bypass window is open.
- Re-enable protection with emergency accounts excluded and monitored.
Do not delete every Conditional Access policy in a panic. You need to identify the one policy that changed the admin sign-in result.
Root Cause
The lockout usually comes from one of these policy patterns:
- A Conditional Access policy targets
All usersandAll cloud appswith no emergency access exclusion. - A policy requires a compliant device, but the admin device is not enrolled or is marked noncompliant.
- A policy requires a hybrid Microsoft Entra joined device, but the admin is on a cloud-only, break-fix, or unmanaged workstation.
- MFA enforcement starts before administrators have registered working methods.
- Authentication strength requires phishing-resistant MFA, but the admin only has SMS, phone, or Microsoft Authenticator push registered.
- Named locations changed, and the admin network is no longer trusted.
- Security defaults were enabled in a tenant that also had fragile admin access assumptions.
- PIM activation requires MFA, but the account cannot complete MFA.
Microsoft’s Conditional Access troubleshooting guidance calls out the risk of selecting all users and all resources. Policies that block access, require compliant devices, require hybrid joined devices, or require app protection across the whole tenant can lock out administrators if the admin does not meet the control.
Microsoft’s emergency access guidance also recommends maintaining two or more emergency access accounts so the tenant is not dependent on normal admin accounts during MFA, federation, or Conditional Access failures.
Logs and where to check
Start with Microsoft Entra sign-in logs. If you still have one admin session open, go to:
Microsoft Entra admin center > Identity > Monitoring & health > Sign-in logs
Open the failed admin sign-in and check these tabs:
Basic info: user, app, client app, IP address, location, failure reason.Conditional Access: which policies applied, which controls were required, and whether the result was success, failure, or not applied.Report-only: policies that would have blocked the sign-in if enabled.Authentication Details: method attempted, method requirement, and whether MFA completed.
Important failure clues:
Access has been blocked by Conditional Access policies.
MFA requirement not satisfied.
Device is not compliant.
Device is not hybrid Azure AD joined.
User did not pass the MFA challenge.
The user is required to use multi-factor authentication.
If you cannot reach the portal but Graph PowerShell works from an existing session, pull recent sign-ins:
Connect-MgGraph -Scopes "AuditLog.Read.All","Policy.Read.All","Directory.Read.All"
Get-MgAuditLogSignIn -Filter "userPrincipalName eq 'admin@contoso.com'" -Top 10 |
Select-Object CreatedDateTime, AppDisplayName, Status, ConditionalAccessStatus |
Format-List
For more detail, inspect the raw Conditional Access policy results:
$signIn = Get-MgAuditLogSignIn -Filter "userPrincipalName eq 'admin@contoso.com'" -Top 1
$signIn.ConditionalAccessPolicies | Format-Table DisplayName, Result -AutoSize
$signIn.Status | Format-List
If the sign-in object is not returned, widen the search to the time window and app:
$start = (Get-Date).AddHours(-4).ToString("o")
Get-MgAuditLogSignIn -Filter "createdDateTime ge $start" -Top 50 |
Where-Object {$_.UserPrincipalName -like "*admin*"} |
Select-Object CreatedDateTime, UserPrincipalName, AppDisplayName, ConditionalAccessStatus
If one admin can still sign in
This is the safest recovery path. Make the smallest possible change.
1. Create or confirm an emergency access group
Use a cloud-only group such as:
CA-Exclude-Emergency-Access
Add only documented break-glass accounts. Do not add the whole IT department.
2. Find the blocking policy
Go to:
Microsoft Entra admin center > Protection > Conditional Access > Policies
Open the failed sign-in log in a second tab. Match the policy name and result from the Conditional Access tab.
The most common admin-killing policies are named like:
Require MFA for all users
Require compliant device for all cloud apps
Block legacy authentication
Require phishing-resistant MFA for admins
Require hybrid joined device
Block access outside trusted locations
Legacy auth blocking is usually not the cause of an interactive admin portal lockout, but it can break Graph scripts, Exchange Online PowerShell, or older admin tooling. Treat interactive browser sign-in and noninteractive tool failures separately.
3. Exclude emergency accounts, then test
Edit the policy:
Assignments > Users > Exclude > Users and groups
Add the emergency access group. Save the policy.
Then test sign-in with the emergency account from a browser profile that has no cached session. Do not trust an already signed-in browser tab.
4. Temporarily switch the policy to report-only if needed
If the policy still blocks all admin access, set only the suspect policy to:
Enable policy: Report-only
Sign in, repair MFA registration or device compliance, then re-enable the policy.
Report-only mode lets you see what Conditional Access would do without enforcing most controls. Microsoft documents that report-only results appear in the Conditional Access and Report-only tabs of sign-in log details. Use that before turning a broad policy back on.
If no normal admin can sign in
Try the emergency access accounts first. These should be cloud-only accounts with Global Administrator eligibility or assignment, stored securely, tested on a schedule, and excluded from Conditional Access policies that could block tenant recovery.
A working emergency account should allow you to:
- Sign in to the Microsoft Entra admin center.
- Confirm the failed admin sign-ins.
- Exclude the emergency access group from the blocking policy.
- Move the suspect policy to report-only if exclusion is not enough.
- Repair admin authentication methods.
If no emergency account works and no admin session is open, you are in vendor recovery territory. Open a Microsoft support case from another tenant or support channel. Be ready with tenant ID, affected admin UPNs, recent policy names, and sign-in error details. Do not ask a non-admin user to attempt risky changes or share credentials.
PowerShell and Graph commands
If you have any active Graph session with policy permissions, collect evidence before editing.
Install and connect:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Policy.ReadWrite.ConditionalAccess","AuditLog.Read.All","Directory.Read.All"
List Conditional Access policies:
Get-MgIdentityConditionalAccessPolicy |
Select-Object Id, DisplayName, State |
Sort-Object DisplayName
Inspect a policy’s assignments and controls:
$policy = Get-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId "<policy-id>"
$policy.DisplayName
$policy.State
$policy.Conditions.Users
$policy.GrantControls
Find policies that include all users:
Get-MgIdentityConditionalAccessPolicy | ForEach-Object {
[pscustomobject]@{
DisplayName = $_.DisplayName
State = $_.State
IncludeUsers = ($_.Conditions.Users.IncludeUsers -join ",")
ExcludeUsers = ($_.Conditions.Users.ExcludeUsers -join ",")
IncludeGroups = ($_.Conditions.Users.IncludeGroups -join ",")
ExcludeGroups = ($_.Conditions.Users.ExcludeGroups -join ",")
}
} | Where-Object {$_.IncludeUsers -match "All"} | Format-Table -AutoSize
Move one known-bad policy to report-only:
Update-MgIdentityConditionalAccessPolicy `
-ConditionalAccessPolicyId "<policy-id>" `
-State "enabledForReportingButNotEnforced"
Disable one policy only if report-only is not enough and you have approval:
Update-MgIdentityConditionalAccessPolicy `
-ConditionalAccessPolicyId "<policy-id>" `
-State "disabled"
Re-enable it after repair:
Update-MgIdentityConditionalAccessPolicy `
-ConditionalAccessPolicyId "<policy-id>" `
-State "enabled"
The hardest part is not the command. It is knowing which policy to touch. Use the sign-in log policy result whenever possible.
Repair the admin account after access returns
Once you have a path back into the tenant, fix the admin account instead of leaving the policy weakened.
Check these items:
- The admin has at least two working MFA methods.
- The admin has a method that satisfies the required authentication strength.
- Temporary Access Pass is available if your organization uses it for recovery.
- The admin can activate PIM roles if roles are eligible rather than permanent.
- The admin device meets any compliant device or hybrid joined requirement.
- Named location conditions match the admin’s real network.
- The emergency access accounts are excluded from broad Conditional Access controls.
For a phishing-resistant MFA rollout, do not enforce the authentication strength against all admins until every admin has registered a supported method and you have tested from a clean browser session.
Prevention
Build the prevention controls before the next policy change.
Maintain two emergency access accounts
Microsoft recommends two or more emergency access accounts. Keep them cloud-only, highly protected, and separate from normal admin accounts. Store credentials in your approved break-glass process. Test them regularly.
Recommended pattern:
- Two cloud-only accounts with long, random passwords.
- Excluded from Conditional Access policies that could block recovery.
- Monitored with alerting on any sign-in.
- Not used for daily administration.
- Reviewed after every Conditional Access change.
Use staged Conditional Access rollout
Before enabling a new control:
- Target a pilot group.
- Use report-only mode.
- Review sign-in logs and the Conditional Access insights workbook.
- Exclude emergency access accounts.
- Confirm admin MFA methods and device state.
- Enable for a broader population only after clean test sign-ins.
Do not target all users without exclusions
All users is valid in some policies, but it is dangerous when paired with all resources and strict grant controls. If you use it, confirm emergency access exclusions and test admin sign-in from a clean browser.
Monitor for emergency account use
Any sign-in by an emergency access account should create an alert and an incident review. A break-glass account is not a backup daily admin. It is a tenant recovery control.
Microsoft references
- Manage emergency access admin accounts in Microsoft Entra ID
- Troubleshooting sign-in problems with Conditional Access
- Conditional Access Policy Insights: Monitoring and Evaluation
- Plan your Microsoft Entra Conditional Access deployment
- Sign-in logs in Microsoft Entra ID
Bottom line
When admins are locked out after MFA enforcement, treat it as a Conditional Access recovery incident. Use an emergency access account, identify the exact policy result in sign-in logs, move only the blocking policy to report-only if needed, repair admin MFA methods, then re-enable enforcement with break-glass exclusions and alerts.