Create and check Entra ID emergency access accounts
Set up two break-glass accounts the way Microsoft recommends, alert on every use, and prove every 90 days that they still sign in.
Before you start
- Who may use the accounts. Name two or three people. Microsoft says the accounts must not be tied to any one person and the credentials must be “available to multiple members of the administration team”.
- Where the credentials live. Microsoft suggests FIDO2 security keys kept in “secure, fireproof safes that are in secure, separate locations”. Decide the two places now, for example the office safe and a bank deposit box. Not a password manager that itself needs an Entra sign-in.
- Two FIDO2 security keys per account, of a different kind from what your normal admins use. Microsoft: if normal admins use Microsoft Authenticator, use a FIDO2 key for the emergency accounts.
- Rights: Privileged Role Administrator or Global Administrator to assign the role, and a Log Analytics workspace that receives Entra sign-in logs, if you want Microsoft’s alert recipe.
- A secure workstation for the test, as Microsoft asks. Not your everyday laptop.
Steps
1. Create two cloud-only accounts
In the Microsoft Entra admin center, create two users on the *.onmicrosoft.com domain. Microsoft: “cloud-only accounts that use the *.onmicrosoft.com domain and that aren’t federated or synchronized from an on-premises environment.” (Microsoft Learn: emergency access accounts) Give them neutral names that do not say “admin” or “emergency” to a passer-by, and note the object IDs.
2. Make the role permanent, not eligible
Assign Global Administrator. In Privileged Identity Management, Microsoft says to make it “active permanent rather than eligible” (source). An eligible role needs activation, and activation may need the very people or systems that are down.
3. Register a passkey (FIDO2) on each account
Microsoft recommends passkeys (FIDO2), or certificate-based authentication if you already run a PKI. These satisfy Microsoft’s mandatory multifactor authentication. (Source.) Register two keys per account so one can stay in each safe location.
4. Exclude the accounts from blocking Conditional Access policies
Put both accounts in one security group, for example EmergencyAccess, and exclude that group from every Conditional Access policy that blocks or restricts sign-in. Report-only policies do not need the exclusion. Then list the policies and check the exclusion is there:
Connect-MgGraph -Scopes "Policy.Read.All"
Get-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State, @{n='ExcludedGroups';e={$_.Conditions.Users.ExcludeGroups -join ', '}}
Source: Get-MgIdentityConditionalAccessPolicy, Microsoft Learn and the property list in conditionalAccessPolicy resource, Microsoft Learn
Every policy with State enabled that blocks or restricts sign-in should list the group’s object ID under ExcludedGroups.
5. Alert on every sign-in
Microsoft’s recipe is an Azure Monitor log alert on the sign-in logs, firing when the count is greater than 0, with an action group that sends email and SMS. Microsoft’s sample query, with your two object IDs:
SigninLogs
| where UserId == "<object-id-1>" or UserId == "<object-id-2>"
| project TimeGenerated, UserPrincipalName, UserId, IPAddress, ResultType, ResultDescription
Source: Monitor sign-in and audit logs, Manage emergency access accounts, Microsoft Learn
Send the SMS to phones and the email to addresses outside your tenant, so the alert still reaches you when Microsoft 365 is the thing that is broken.
6. Check sign-in every 90 days, from where the keys really are
Microsoft: “Validate account functionality at least every 90 days.” Take a key out of its safe, sign in on the secure workstation, open the admin center, sign out, and put the key back. Then confirm the alert fired, and look at the sign-in record:
Connect-MgGraph -Scopes "AuditLog.Read.All"
Get-MgAuditLogSignIn -Filter "userId eq '<object-id-1>'" -Top 5 | Select-Object CreatedDateTime, UserPrincipalName, IpAddress, @{n='ErrorCode';e={$_.Status.ErrorCode}}
Source: Connect-MgGraph and Get-MgAuditLogSignIn, Microsoft Learn
An ErrorCode of 0 means the sign-in succeeded. Write the check in the table below.
What good and bad look like
- Good: both accounts sign in with their keys, the alert reaches a phone within the time you set, and every blocking policy excludes the group.
- Bad: sign-in asks for a compliant device or an app the account does not have. A policy still applies to it. Fix the exclusion today.
- Bad: nobody received the alert, or it went only to a mailbox in the tenant.
- Bad: the key is not where the record says it is. Treat that as a lost credential (Undo).
Traps
- Eligible instead of active. If the role is eligible in PIM and the approvers are gone, nobody can activate it. Microsoft lists this exact lock-out.
- Same method as normal admins. One outage of that method then locks out everyone.
- Automatic clean-up. Microsoft warns the account or credential must not expire or be removed by clean-up for lack of use. Check inactive-account and access-review rules.
- A new Conditional Access policy. Every new blocking policy needs the exclusion. Make the group part of your policy template.
- Credentials that need the tenant. A password manager, a phone app or a document in SharePoint that needs an Entra sign-in is not available in an Entra outage.
Undo
- A key is lost or the account was used without reason: follow Microsoft’s post-use review, remove the lost key from the account, register a new one, and revoke the account’s sessions as in Revoke user access in Microsoft Entra ID.
- Retiring an account: create and check its replacement first. Never go below two working emergency accounts.
Record it
Example included. The row marked Example is made up to show the format. Delete it and add your own rows.
| Date | Account | Key used, from where | Signed in? | Alert received? | Next check due | Initials |
|---|---|---|---|---|---|---|
| Example: 2026-12-01 | Account 1 | Key B, bank deposit box | Yes, error code 0 | Yes, SMS after 6 minutes | 2027-03-01 | AB |