Conditional Access foundations: break-glass accounts, exclusion groups, and the logging you want before any policy
Entra ID · Conditional Access · Break-Glass · 2026
Before you deploy a single Conditional Access policy, three things have to be in place: two break-glass accounts with phishing-resistant MFA, a clean exclusion group pattern, and sign-in logs wired to real alerts. This is the Part 2 deep dive — the setup that stops a misconfigured policy from turning into a business-hours incident, and that every auditor is going to ask about sooner or later. Skip any of it and you are borrowing trouble from your future self.
.onmicrosoft.com, not your custom domain. Custom domains can be caught up in federation or sync states that interfere in an emergencyCA-Exclusions-BreakGlass, CA-Exclusions-ServiceAccounts, CA-Exclusions-Travel — each documented, each reviewedThis is the least glamorous article in the series, and the most important one. The policies in Part 3 are easy to write and easy to get wrong. What makes the difference between a clean rollout and a two-day outage is whether the foundations are already in place when the first policy goes live.
Three sections cover those foundations: break-glass accounts (the full setup, not the summary), exclusion groups (the naming pattern and review cadence), and logging and alerting (sign-in logs, audit logs, the Log Analytics wiring, and the alert rules that actually matter). One additional section covers pre-deployment hygiene — the state the tenant should be in before Policy 1 goes into Report-only.
Break-glass accounts — the complete setup
Break-glass accounts exist for exactly one scenario: you deployed a Conditional Access policy that locks out every admin in the tenant, including yourself, and you need to sign in to fix it. That scenario happens. It happens to consultants who know what they are doing. The only question is whether you are ready for it.
The shape of a defensible setup is six decisions made correctly. Each one has a wrong version that looks fine until the moment you actually need the account.
.onmicrosoft.combreakglass-01 and breakglass-02. Use the default @yourtenant.onmicrosoft.com domain, not your custom domain. The reason: custom domains can be federated to on-premises AD FS, can be in the middle of a domain migration, or can be affected by Entra Connect sync states that break sign-in at exactly the wrong moment. The .onmicrosoft.com domain is always cloud-native and is always there. Set a 32+ character random password, generated by a password manager, stored in two physically separate secure locations (two safes, or a safe and a director's sealed envelope in a lockbox). They usually do not need workload licences such as Exchange or Teams — keep them as lean as possible. Do not add them to distribution lists. Set "usage location" to your primary country if required for compliance, otherwise leave blank.https://aka.ms/mysecurityinfo while signed in as the break-glass account itself. Test sign-in with each key immediately. Label the keys physically with "BG-01-A", "BG-01-B", "BG-02-A", "BG-02-B".CA-Exclusions-BreakGlass → Membership type: Assigned → add both break-glass accounts as members. Add a group description: "Excluded from ALL Conditional Access policies. Reviewed annually by IT Lead. Contains only break-glass accounts." That description is your paper trail when someone asks why these accounts are exempt. Every Conditional Access policy you create from now on references this group under Users → Exclude → Groups. Never individual users. If you do it with a group, you cannot forget one of the accounts when adding a new policy.SignInLogs and AuditLogs to a Log Analytics workspace. In that workspace, create an alert rule (Alerts → New alert rule → scope: LAW → condition: custom log search) using the KQL query below. Action group notifies the IT Lead's mobile and email. Threshold: one record in any 15-minute window. See the KQL snippet in the next code block.// Run in the Log Analytics workspace receiving SignInLogs
// Use in an Azure Monitor alert rule: threshold = any row in 15 min window
SigninLogs
| where UserPrincipalName in~ (
"breakglass-01@contoso.onmicrosoft.com",
"breakglass-02@contoso.onmicrosoft.com"
)
| project TimeGenerated, UserPrincipalName, ResultType,
IPAddress, AppDisplayName, Location, ClientAppUsed
| order by TimeGenerated desc
ResultType; that is deliberate.
The exclusion group pattern
A Conditional Access policy without exclusions applies to everyone assigned to it. Reality is messier than that: service accounts, roaming executives, temporary contractors, third-party integrators. The question is not whether to have exclusions — it is whether your exclusion pattern is defensible six months from now when an auditor asks why finance@contoso.com is exempt from Policy 4.
The pattern is simple: exclusions are always groups, named predictably, with documented reasons and review dates. Individual user exclusions are technical debt that auditors hate and that you forget about.
CA-Exclusions-BreakGlassCA-Exclusions-ServiceAccountsCA-Exclusions-TravelCA-Exclusions-TempAccessThree operational rules keep this pattern clean. First, each exclusion group carries its purpose in its description: "Members are automatically blocked from Policy 6 (unexpected countries). Owner: HR. Reviewed monthly." The description is your audit trail. Second, use Entra ID access reviews on the exclusion groups — especially Travel and TempAccess, where membership should churn. Third, resist the temptation to create ad-hoc exclusion groups for one-off situations. If you find yourself wanting to, the question is usually whether the policy itself needs tuning, not whether another group needs carving out.
Sign-in logs and Log Analytics
Entra ID keeps sign-in logs for 30 days for tenants with Entra ID P1 or higher. That is enough for tactical investigation, not for audit, incident forensics, or trend analysis. The answer is to stream the logs to a Log Analytics workspace — and, if you use Microsoft Sentinel, to Sentinel on top of that.
law-<tenant>-security. Keep it in a subscription dedicated to security / management resources if you can — it protects the workspace from accidental deletion during project cleanups.SignInLogs, AuditLogs, NonInteractiveUserSignInLogs, ServicePrincipalSignInLogs. Destination: the Log Analytics workspace. If you have Entra P2, also include RiskyUsers and UserRiskEvents.The first alert pays for the workspace on day one. The others accumulate value as your baseline matures. Six months in, the Log Analytics workspace will be the single most useful tool you have for demonstrating identity hygiene to anyone who asks.
Audit logs and CA change detection
Audit logs capture administrative changes: who modified which Conditional Access policy, who assigned a role, who added a member to a group. For a baseline rollout, the one alert that matters most is "someone modified a Conditional Access policy". During rollout you want to know every time; post-rollout you want to know because unplanned CA changes are a sign of either sloppy change control or a compromise.
AuditLogs
| where Category == "Policy"
| where OperationName has "conditional access"
| extend Actor = tostring(InitiatedBy.user.userPrincipalName)
| project TimeGenerated, OperationName, Result, Actor, TargetResources
| order by TimeGenerated desc
Run that as a saved query in the workspace, and turn it into an alert rule with a 15-minute evaluation window. Combined with regular JSON exports of the full policy set (see the Graph PowerShell snippet in Part 1), you have a complete audit record: every change timestamped, every policy state recoverable, every actor identified.
Pre-deployment tenant hygiene
Four quick checks before Policy 1 goes into Report-only. Each of them turns up data that changes how you deploy.
For the MFA registration check, if you prefer Graph PowerShell over the portal:
Connect-MgGraph -Scopes "AuditLog.Read.All","UserAuthenticationMethod.Read.All"
Get-MgReportAuthenticationMethodUserRegistrationDetail -All |
Where-Object { -not $_.IsMfaRegistered -and $_.UserType -eq "member" } |
Select-Object UserPrincipalName, UserDisplayName, UserType, IsMfaCapable |
Export-Csv -Path ".\mfa-unregistered-$(Get-Date -Format yyyyMMdd).csv" -NoTypeInformation
Foundations checklist
-
Two break-glass accounts created on
.onmicrosoft.com, with no unnecessary workload licences assigned, 32+ char password stored in two safe locations Test sign-in with password alone confirmed before adding MFA. -
Two FIDO2 keys per break-glass account, physically labelled, stored in two separate secure locations Sign-in with each key verified at least twice.
-
Both break-glass accounts permanently assigned Global Admin (not via PIM) Listed in the privileged access runbook.
-
CA-Exclusions-BreakGlassgroup created, both accounts added, described Description includes owner, review cadence, and purpose. -
Exclusion groups for ServiceAccounts, Travel, TempAccess created with documented owners Empty is fine — the groups must exist before the policies reference them.
-
Log Analytics workspace created, 90+ day retention, Entra diagnostic settings streaming
SignInLogs,AuditLogs,NonInteractiveUserSignInLogs,ServicePrincipalSignInLogsminimum. -
Alert rule on break-glass sign-in live, tested with a manual sign-in Action group routes to IT Lead mobile + email.
-
Alert rule on Conditional Access policy changes live Baseline period captured: any future change shows as a diff.
-
Pre-deployment hygiene checks completed: legacy auth, MFA registration, admin device state, Security Defaults Reports exported and archived; remediation planned where needed.
-
Runbook written: break-glass accounts, key locations, test schedule, rotation schedule Stored in IT folder and physical safe. First test scheduled.
- Microsoft Learn — Emergency access admin accounts
- Microsoft Learn — Enable FIDO2 security keys
- Microsoft Learn — Stream Entra ID logs to Log Analytics
- Microsoft Learn — Create log search alert rules
- Microsoft Learn — Privileged Identity Management
- Microsoft Learn — Authentication methods activity report
- CISA — Implementing phishing-resistant MFA