← Back to SOC feed Coverage →

Entra ID account performs privileged operation shortly after admin password reset

kql MEDIUM Azure-Sentinel
T1098T1098.003T1078.004
AuditLogs
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-27T23:00:00Z · Confidence: medium

Hunt Hypothesis

An adversary may reset an admin’s password to gain elevated access and then immediately perform privileged operations to compromise the environment. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect potential credential theft and privilege escalation tactics early.

KQL Query

let timeframe = 1d;
let correlationWindow = 30m;
let PrivilegedOps = dynamic([
    "Add member to role.",
    "Add member to role",
    "Add service principal credentials.",
    "Add service principal credentials",
    "Update application - Certificates and secrets management",
    "Add owner to service principal.",
    "Add owner to service principal",
    "Set domain authentication.",
    "Set domain authentication"
]);
// Admin-initiated password resets (different actor from target)
let PasswordResets =
    AuditLogs
    | where TimeGenerated >= ago(timeframe)
    | where OperationName in~ ("Reset user password.", "Reset user password")
    | where Result =~ "success"
    | extend ResetActorUpn = tolower(tostring(InitiatedBy.user.userPrincipalName))
    | extend ResetActorApp = tostring(InitiatedBy.app.displayName)
    | mv-expand TargetResource = TargetResources
    | where tostring(TargetResource.type) =~ "User"
    | extend ResetTargetUpn = tolower(tostring(TargetResource.userPrincipalName))
    | where isnotempty(ResetTargetUpn)
    | where ResetActorUpn != ResetTargetUpn
    | project ResetTime = TimeGenerated, ResetActorUpn, ResetActorApp, ResetTargetUpn;
// Privileged operations initiated by the reset target within the correlation window
let FollowOnOps =
    AuditLogs
    | where TimeGenerated >= ago(timeframe)
    | where OperationName in~ (PrivilegedOps)
    | where Result =~ "success"
    | extend ActorUpn = tolower(tostring(InitiatedBy.user.userPrincipalName))
    | extend ActorIp  = iff(
          isnotempty(tostring(InitiatedBy.user.ipAddress)),
          tostring(InitiatedBy.user.ipAddress),
          tostring(InitiatedBy.app.ipAddress))
    | where isnotempty(ActorUpn)
    | project OpTime = TimeGenerated, ActorUpn, ActorIp, OperationName;
PasswordResets
| join kind=inner FollowOnOps on $left.ResetTargetUpn == $right.ActorUpn
| where OpTime between (ResetTime .. (ResetTime + correlationWindow))
| extend AccountName      = tostring(split(ResetTargetUpn, "@")[0])
| extend AccountUPNSuffix = tostring(split(ResetTargetUpn, "@")[1])
| project
    ResetTime,
    ResetTargetUpn,
    AccountName,
    AccountUPNSuffix,
    ResetActorUpn,
    ResetActorApp,
    OpTime,
    OperationName,
    ActorIp
| sort by ResetTime desc

Analytic Rule Definition

id: a7589e25-ff97-48ab-aa2f-8de1df7ed9c0
name: Entra ID account performs privileged operation shortly after admin password reset
description: |
  Identifies accounts initiating high-impact Entra ID operations within 30 minutes of
  having their password reset by a different actor. Cross-actor correlation
  (ResetActorUpn != ResetTargetUpn) separates this from self-service and helpdesk
  reset flows.
requiredDataConnectors:
  - connectorId: AzureActiveDirectory
    dataTypes:
      - AuditLogs
tactics:
  - Persistence
  - PrivilegeEscalation
relevantTechniques:
  - T1098
  - T1098.003
  - T1078.004
query: |
  let timeframe = 1d;
  let correlationWindow = 30m;
  let PrivilegedOps = dynamic([
      "Add member to role.",
      "Add member to role",
      "Add service principal credentials.",
      "Add service principal credentials",
      "Update application - Certificates and secrets management",
      "Add owner to service principal.",
      "Add owner to service principal",
      "Set domain authentication.",
      "Set domain authentication"
  ]);
  // Admin-initiated password resets (different actor from target)
  let PasswordResets =
      AuditLogs
      | where TimeGenerated >= ago(timeframe)
      | where OperationName in~ ("Reset user password.", "Reset user password")
      | where Result =~ "success"
      | extend ResetActorUpn = tolower(tostring(InitiatedBy.user.userPrincipalName))
      | extend ResetActorApp = tostring(InitiatedBy.app.displayName)
      | mv-expand TargetResource = TargetResources
      | where tostring(TargetResource.type) =~ "User"
      | extend ResetTargetUpn = tolower(tostring(TargetResource.userPrincipalName))
      | where isnotempty(ResetTargetUpn)
      | where ResetActorUpn != ResetTargetUpn
      | project ResetTime = TimeGenerated, ResetActorUpn, ResetActorApp, ResetTargetUpn;
  // Privileged operations initiated by the reset target within the correlation window
  let FollowOnOps =
      AuditLogs
      | where TimeGenerated >= ago(timeframe)
      | where OperationName in~ (PrivilegedOps)
      | where Result =~ "success"
      | extend ActorUpn = tolower(tostring(InitiatedBy.user.userPrincipalName))
      | extend ActorIp  = iff(
            isnotempty(tostring(InitiatedBy.user.ipAddress)),
            tostring(InitiatedBy.user.ipAddress),
            tostring(InitiatedBy.app.ipAddress))
      | where isnotempty(ActorUpn)
      | project OpTime = TimeGenerated, ActorUpn, ActorIp, OperationName;
  PasswordResets
  | join kind=inner FollowOnOps on $left.ResetTargetUpn == $right.ActorUpn
  | where OpTime between (ResetTime .. (ResetTime + correlationWindow))
  | extend AccountName      = tostring(split(ResetTargetUpn, "@")[0])
  | extend AccountUPNSuffix = tostring(split(ResetTargetUpn, "@")[1])
  | project
      ResetTime,
      ResetTargetUpn,
      AccountName,
      AccountUPNSuffix,
      ResetActorUpn,
      ResetActorApp,
      OpTime,
      OperationName,
      ActorIp
  | sort by ResetTime desc
e

Required Data Sources

Sentinel TableNotes
AuditLogsEnsure 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/AuditLogs/PasswordResetThenPrivilegedOperation.yaml