Entra ID Potential Passkey Downgrade
Description
Identifies a Microsoft Entra ID user whose recent fresh authentications are predominantly phishing-resistant (passkey/FIDO2 or Windows Hello for Business) but who then successfully completes a phishable method such as Authenticator push, OATH, SMS, or voice. Adversary-in-the-middle proxies force this downgrade by suppressing the passkey prompt so the victim falls back to a relayable method. Legitimate fallback produces the same pattern, so the alert requires corroboration.
Query · esql
FROM logs-azure.signinlogs-*
| WHERE azure.signinlogs.category == "SignInLogs"
AND azure.signinlogs.properties.session_id IS NOT NULL
AND azure.signinlogs.properties.authentication_details IS NOT NULL
AND azure.signinlogs.properties.user_id IS NOT NULL
AND azure.signinlogs.properties.user_principal_name IS NOT NULL
AND azure.signinlogs.properties.tenant_id IS NOT NULL
// Pair each authentication method with its success flag from the flattened authentication_details
| EVAL ad = TO_STRING(azure.signinlogs.properties.authentication_details)
| GROK ad """"authentication_method":%{DATA:method_raw},"authentication_"""
| GROK ad """"succeeded":%{DATA:succeeded_raw}}"""
| EVAL Esql.auth_methods = SPLIT(REPLACE(method_raw, """[\[\]"]""", ""), ","),
Esql.auth_method_succeeded = SPLIT(REPLACE(succeeded_raw, """[\[\]"]""", ""), ",")
| EVAL Esql.method_outcome_pairs = MV_CONCAT(MV_ZIP(Esql.auth_methods, Esql.auth_method_succeeded, "~"), " || ")
// Flag sessions where a phishing-resistant or a phishable method actually succeeded (passkey/WHfB vs push/OATH/SMS/voice)
| EVAL Esql.resistant_method_success = CASE(
Esql.method_outcome_pairs LIKE "*Passkey (synced)~true*" OR Esql.method_outcome_pairs LIKE "*Passkey (device-bound)~true*"
OR Esql.method_outcome_pairs LIKE "*FIDO2 security key~true*" OR Esql.method_outcome_pairs LIKE "*Windows Hello for Business~true*", 1, 0),
Esql.phishable_method_success = CASE(
Esql.method_outcome_pairs LIKE "*Mobile app notification~true*" OR Esql.method_outcome_pairs LIKE "*OATH verification code~true*"
OR Esql.method_outcome_pairs LIKE "*Text message~true*" OR Esql.method_outcome_pairs LIKE "*Voice call~true*", 1, 0)
// A downgrade event is a phishable method succeeding within the recent window
| EVAL Esql.is_downgrade = Esql.phishable_method_success == 1 AND @timestamp >= NOW() - 24 hour
// Aggregate session counts and downgrade-event context by tenant and user
| STATS Esql.total_sessions = COUNT_DISTINCT(azure.signinlogs.properties.session_id),
Esql.resistant_sessions = COUNT_DISTINCT(CASE(Esql.resistant_method_success == 1, azure.signinlogs.properties.session_id, null)),
Esql.phishable_sessions = COUNT_DISTINCT(CASE(Esql.phishable_method_success == 1, azure.signinlogs.properties.session_id, null)),
Esql.baseline_resistant = COUNT_DISTINCT(CASE(Esql.resistant_method_success == 1 AND @timestamp < NOW() - 24 hour, azure.signinlogs.properties.session_id, null)),
Esql.baseline_phishable = COUNT_DISTINCT(CASE(Esql.phishable_method_success == 1 AND @timestamp < NOW() - 24 hour, azure.signinlogs.properties.session_id, null)),
Esql.downgrade_session_count = COUNT_DISTINCT(CASE(Esql.is_downgrade, azure.signinlogs.properties.session_id, null)),
Esql.last_seen = MAX(@timestamp),
Esql.downgrade_methods = VALUES(CASE(Esql.is_downgrade, Esql.method_outcome_pairs, null)),
Esql.downgrade_sessions = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.session_id, null)),
Esql.downgrade_ips = VALUES(CASE(Esql.is_downgrade, source.ip, null)),
Esql.downgrade_as_orgs = VALUES(CASE(Esql.is_downgrade, source.`as`.organization.name, null)),
Esql.downgrade_countries = VALUES(CASE(Esql.is_downgrade, source.geo.country_name, null)),
Esql.downgrade_user_agents = VALUES(CASE(Esql.is_downgrade, user_agent.original, null)),
Esql.downgrade_device_os = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.device_detail.operating_system, null)),
Esql.downgrade_apps = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.app_display_name, null)),
Esql.downgrade_resources = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.resource_display_name, null)),
Esql.downgrade_client_apps = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.client_app_used, null)),
Esql.downgrade_ca_status = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.conditional_access_status, null)),
Esql.downgrade_risk_states = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.risk_state, null)),
Esql.downgrade_correlation_ids = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.correlation_id, null)),
Esql.downgrade_outcomes = VALUES(CASE(Esql.is_downgrade, event.outcome, null))
BY azure.signinlogs.properties.tenant_id, azure.signinlogs.properties.user_principal_name, azure.signinlogs.properties.user_id
// Require a minimum resistant baseline (sessions older than 24h) and at least one recent downgrade
| WHERE Esql.baseline_resistant >= 3 AND Esql.downgrade_session_count >= 1
// Phishing-resistant ratio over the baseline only, so the downgrade session should not dilute it (token-reuse / unresolved sessions excluded)
| EVAL Esql.unknown_sessions = Esql.total_sessions - Esql.phishable_sessions - Esql.resistant_sessions,
Esql.fresh_auth_sessions = Esql.resistant_sessions + Esql.phishable_sessions,
Esql.resistant_ratio = Esql.baseline_resistant::double / (Esql.baseline_resistant + Esql.baseline_phishable)
// Keep predominantly phishing-resistant users (>= 90%)
| WHERE Esql.resistant_ratio >= 0.9
| KEEP azure.*, Esql.*
Implementation guide
This rule requires the Azure integration with Microsoft Entra ID Sign-In logs enabled and collected via Azure Event Hub.
Known false positives
- A user who predominantly uses a passkey can legitimately fall back to a weaker method when their authenticator is unavailable (lost or forgotten security key, new or wiped device, biometric failure). Correlate the downgrade session's source IP, geo, ASN, user agent, device, and Conditional Access result with the user's norm, and confirm whether a help-desk or self-service recovery occurred. Only meaningful in environments with meaningful passkey adoption.
Analyst notes
Investigating Entra ID Potential Passkey Downgrade
This rule flags a user whose fresh authentications over the window are predominantly phishing-resistant (passkey/FIDO2 or Windows Hello for Business) but who then successfully completed authentication with a phishable method (Authenticator push, OATH, SMS, or voice) in the recent window. Each sign-in's authentication_details steps are paired with their succeeded flag, so only methods that actually succeeded are counted. The phishing-resistant ratio is computed over a baseline of sessions older than 24 hours (at least 3 resistant sessions required), so the recent downgrade cannot dilute it, and only over sessions with a successful fresh method (resistant plus phishable); sessions with only single sign-on token reuse (or whose establishing event is outside the window) are reported as unknown and excluded from the ratio rather than assumed to be passkey. Adversary-in-the-middle phishing can force this downgrade by suppressing the passkey prompt so the victim falls back to a relayable method the proxy can capture.
Possible investigation steps
- Review the recent downgrade session(s) (
Esql.downgrade_sessions,Esql.downgrade_methods,Esql.downgrade_apps,Esql.downgrade_resources): inspectEsql.downgrade_user_agentsandEsql.downgrade_device_osfor an unsupported/impossible browser-OS pairing,Esql.downgrade_ips/Esql.downgrade_countries/Esql.downgrade_as_orgsfor hosting or VPS origins, andEsql.downgrade_ca_statusfor whether Conditional Access actually granted access. - Confirm the user is genuinely passkey-preferring (
Esql.baseline_resistant,Esql.baseline_phishable,Esql.resistant_ratio) rather than one who routinely mixes methods, and reviewEsql.unknown_sessions(token reuse / unresolved origin) separately. - Correlate with recent authentication-method registration (a new passkey added nearby) and with device registration or PRT issuance for post-compromise persistence, and with subsequent
Previously satisfiedtoken reuse from a new ASN (stolen-session use).
False positive analysis
- Legitimate fallback when a passkey authenticator is unavailable produces the same shape; validate device, network, and recovery workflow.
- A durable shift away from passkey lowers the resistant ratio over the window and stops qualifying.
Response and remediation
- If unauthorized, treat the account as potentially compromised: revoke sessions and refresh tokens, remove any attacker-registered authentication methods or devices (delete devices first to break device-bound PRT persistence), and reset credentials.
- Enforce a phishing-resistant Conditional Access authentication strength so weaker methods cannot satisfy authentication.