← Back to SOC feed Coverage →

Risky Sign-in with ElevateAccess

kql MEDIUM Azure-Sentinel
CloudAppEvents
backdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-24T11:00:00Z · Confidence: medium

Hunt Hypothesis

Users who experience a risky sign-in event followed by an ElevateAccess action may indicate potential credential compromise or unauthorized elevation of privileges, as adversaries could exploit compromised credentials to gain higher access levels. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential lateral movement or privilege escalation attempts.

KQL Query

let riskySignInLookback = 3d;
let elevatedUsers =
( CloudAppEvents
| where Timestamp > ago(1d)
| where ApplicationId == 12260 // filter Azure Resource Manager events 
| where ActionType has "elevateAccess"
| project  elevatedOperationTimestamp = Timestamp, AccountObjectId);
let hasElevatedUsers = isnotempty(toscalar(elevatedUsers));
EntraIdSignInEvents
| where hasElevatedUsers
| where Timestamp > ago(riskySignInLookback)
| where ErrorCode == 0
| where RiskLevelDuringSignIn in (50, 100) //10 - low, 50 - medium, 100 - high)
| join elevatedUsers on AccountObjectId
| where elevatedOperationTimestamp > Timestamp
| project LoginTime = Timestamp, elevatedOperationTimestamp, AccountObjectId, AccountDisplayName, riskScore = RiskLevelDuringSignIn

Analytic Rule Definition

id: 158b565b-411b-4dec-81de-2d2bcaf0c34c
name: Risky Sign-in with ElevateAccess
description: |
  Looks for users who had a risky sign in (based on Entra ID Identity Protection risk score) and then performed and ElevateAccess action. ElevateAccess operations can be used by Global Admins to obtain permissions over Azure resources. 
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - CloudAppEvents
  - EntraIdSignInEvents
tactics:
- PrivilegeEscalation
query: |
  let riskySignInLookback = 3d;
  let elevatedUsers =
  ( CloudAppEvents
  | where Timestamp > ago(1d)
  | where ApplicationId == 12260 // filter Azure Resource Manager events 
  | where ActionType has "elevateAccess"
  | project  elevatedOperationTimestamp = Timestamp, AccountObjectId);
  let hasElevatedUsers = isnotempty(toscalar(elevatedUsers));
  EntraIdSignInEvents
  | where hasElevatedUsers
  | where Timestamp > ago(riskySignInLookback)
  | where ErrorCode == 0
  | where RiskLevelDuringSignIn in (50, 100) //10 - low, 50 - medium, 100 - high)
  | join elevatedUsers on AccountObjectId
  | where elevatedOperationTimestamp > Timestamp
  | project LoginTime = Timestamp, elevatedOperationTimestamp, AccountObjectId, AccountDisplayName, riskScore = RiskLevelDuringSignIn

Required Data Sources

Sentinel TableNotes
CloudAppEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Privilege escalation/riskySignInToElevateAccess.yaml