Query Details
# KQL query for usage of emergency access (break glass) accounts To be used as a log analytics query as an alert rule with the following settings: 1. Signal name: Custom log search 2. Query: See query 3. Measurement: Aggregation granularity: 5 minutes 4. Alert logic: Operator: Greater than, Threshold value: 0, Frequency of evaluation: 5 minutes 5. Action group: Create new action group called "BreakGlassNotifications" 6. Email notify: Provide appropriate email address 7. Alert rule details: Severity: Critical, Alert rule name: Emergency Access Account Monitor, Alert rule description: "This alert will fire off in the event that an emergency access account is used for sign-in. These accounts should only be used in emergency situations and with prior approval." ```kusto // Search for multiple Object IDs (UserIds) - Emergency access accounts SigninLogs | where UserId == "Object ID here" or UserId == "Object ID here" | project TimeGenerated, Identity, UserPrincipalName, AppDisplayName, Status, Location, AuthenticationDetails | order by TimeGenerated desc ```
This KQL query is designed to monitor the usage of emergency access (break glass) accounts by analyzing sign-in logs. Here's a simplified summary of the query and its alert setup:
Purpose: The query checks for sign-ins using specific emergency access accounts, identified by their Object IDs. These accounts are meant for use only in critical situations.
Query Details:
SigninLogs for entries where the UserId matches specified Object IDs (representing emergency accounts).Alert Configuration:
Overall, this setup ensures that any unauthorized or unexpected use of emergency access accounts is promptly detected and reported, allowing for immediate investigation and response.

Nathan Hutchinson
Released: February 2, 2026
Tables
Keywords
Operators