1. Home
  2. Lab library
  3. IB-ENTRA-START

Emergency Access Accounts: Build, Alert and Drill

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…

Level Beginner Time about 75 minutes Updated
Quick answer

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.

What changed

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.

Emergency access accounts from creation to a tested drill01Create two accountsCloud-only Global Administrators02Register passkeysFIDO2 keys stored apart03Exclude from policyConditional Access exclusions04Alert on sign-inLog Analytics alert rule05Run the drillTimed, recorded, repeated
Emergency access accounts from creation to a tested drill

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

  1. In the Entra admin centre go to Identity, Users, All users, New user, Create new user.
  2. 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.
  3. Choose a name that does not point at a person. These accounts belong to the organisation.
  4. Assign the Global Administrator role as a permanent active assignment, not an eligible one.
  5. 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

  1. Check that Passkey (FIDO2) is enabled under Protection, Authentication methods, Policies.
  2. Sign in as ea-01, open My Security info and add a security key. Give the key a PIN.
  3. Repeat for ea-02 with the second key.
  4. Label the keys and store them in two separate, access-controlled places. Record who can reach each one.
Do not

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

  1. Create a security group named GRP-EmergencyAccess and add both accounts.
  2. Edit each Conditional Access policy and add the group under Users, Exclude.
  3. 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
  1. Select New alert rule from the query.
  2. Measure: table rows. Threshold: greater than 0. Evaluate every 5 minutes.
  3. 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

  1. Start a timer. Ask a colleague who has not done this before to retrieve one key, following only the written procedure.
  2. Sign in to the Entra admin centre as that account and open Conditional Access.
  3. Confirm the alert arrived and note how long it took.
  4. 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.
Verify

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.

Built and published by Muhammad Rizwan Afzal for Identity Bytes. Run every lab against a disposable test tenant, never production.