Emergency access accounts, often called break-glass accounts, let you recover a tenant when normal admin sign-in fails. In this lab you create two cloud-only Global Administrator accounts, register phishing-resistant credentials, exclude them from Conditional Access, alert on every sign-in and prove the process with a timed drill.
Key takeaways
- Create two cloud-only accounts on the onmicrosoft.com domain, not synced from Active Directory
- Use FIDO2 security keys or certificates, because admin portals now require MFA
- Exclude the accounts from Conditional Access and alert on every sign-in
- An untested emergency account is a guess. Drill it on a schedule
Why this lab matters
Every tenant eventually has a bad day: a Conditional Access policy that blocks all administrators, a federation outage, an MFA service problem, or the only Global Administrator leaving the company. Emergency access accounts are the planned way back in. They are powerful, so they need to be rare, protected and loud when used.
Microsoft now requires MFA for sign-ins to the Azure portal, the Entra admin centre and other admin portals. A long password in a safe is no longer enough. Emergency accounts need a phishing-resistant method such as a FIDO2 security key or certificate-based authentication.
What you need
- A test tenant and the Global Administrator role.
- Two FIDO2 security keys, or one key and a certificate, so the two accounts do not share a method.
- A Log Analytics workspace receiving Entra sign-in logs, for the alert in Step 4.
Step 1: Create the accounts
- In the Entra admin centre go to Identity, Users, All users, New user, Create new user.
- Use the tenant's initial domain, for example
ea-01@contoso.onmicrosoft.com. This keeps the account working if a custom domain or federation fails. - Choose a name that does not point at a person. These accounts belong to the organisation.
- Assign the Global Administrator role as a permanent active assignment, not an eligible one.
- Repeat for
ea-02.
Confirm both are cloud-only and hold the role:
Connect-MgGraph -Scopes "User.Read.All", "RoleManagement.Read.Directory"
Get-MgUser -Filter "startswith(userPrincipalName,'ea-0')" `
-Property UserPrincipalName, OnPremisesSyncEnabled, AccountEnabled |
Select-Object UserPrincipalName, OnPremisesSyncEnabled, AccountEnabled
OnPremisesSyncEnabled must be empty for both accounts.
Step 2: Register phishing-resistant credentials
- Check that Passkey (FIDO2) is enabled under Protection, Authentication methods, Policies.
- Sign in as
ea-01, open My Security info and add a security key. Give the key a PIN. - Repeat for
ea-02with the second key. - Label the keys and store them in two separate, access-controlled places. Record who can reach each one.
Do not register a personal phone, a personal mailbox or one person's authenticator app on an emergency account. The account must work when that person is unavailable.
Step 3: Exclude the accounts from Conditional Access
- Create a security group named
GRP-EmergencyAccessand add both accounts. - Edit each Conditional Access policy and add the group under Users, Exclude.
- Consider leaving one account excluded from every policy and letting the second be covered by a policy that requires phishing-resistant MFA only. That gives you one account that survives any policy mistake.
List policies that still do not exclude the group:
Connect-MgGraph -Scopes "Policy.Read.All", "Group.Read.All"
$grp = Get-MgGroup -Filter "displayName eq 'GRP-EmergencyAccess'"
Get-MgIdentityConditionalAccessPolicy -All |
Where-Object { $_.Conditions.Users.ExcludeGroups -notcontains $grp.Id } |
Select-Object DisplayName, State
Step 4: Alert on every sign-in
In your Log Analytics workspace, create an alert rule with this query. It should fire on any result, including failures.
SigninLogs
| where UserPrincipalName in~ ("ea-01@contoso.onmicrosoft.com", "ea-02@contoso.onmicrosoft.com")
| project TimeGenerated, UserPrincipalName, ResultType, IPAddress, AppDisplayName, Location
- Select New alert rule from the query.
- Measure: table rows. Threshold: greater than 0. Evaluate every 5 minutes.
- Send it to an action group that reaches the security team by email and SMS or a chat channel. Set the severity to the highest level you use.
Step 5: Run the drill
- Start a timer. Ask a colleague who has not done this before to retrieve one key, following only the written procedure.
- Sign in to the Entra admin centre as that account and open Conditional Access.
- Confirm the alert arrived and note how long it took.
- Sign out, return the key and record the drill: date, who took part, time to sign in, time to alert, and anything that was unclear.
The lab is complete when both accounts can sign in with their keys, neither is blocked by any policy, an alert fires within minutes of use, and you have a dated drill record.
Evidence to keep
- The account list showing cloud-only status and the Global Administrator assignment.
- The output proving every Conditional Access policy excludes the group.
- The alert rule definition and a copy of the alert from the drill.
- The drill record, signed off by the account owner.
Clean up
In a test tenant, delete both accounts, the group and the alert rule. In a real tenant keep them, review them every quarter and repeat the drill at least twice a year and after any change in admin staff.
Frequently asked questions
How many break-glass accounts should a tenant have?
Microsoft recommends at least two emergency access accounts. Two accounts with different credentials, stored in different places, protect you if one key is lost or one storage location cannot be reached.
Do emergency access accounts need MFA?
Yes. Microsoft enforces MFA for sign-ins to admin portals, so emergency accounts should use a phishing-resistant method such as a FIDO2 security key or certificate-based authentication instead of a password alone.
Should break-glass accounts be excluded from Conditional Access?
At least one should be excluded from all Conditional Access policies so a faulty policy cannot lock every administrator out. Because of that exclusion, every sign-in must raise an alert.
How often should you test emergency access accounts?
Test at least twice a year, and again whenever admin staff change or the storage process changes. A drill should cover retrieving the credential, signing in and confirming the alert fired.