← Back to SOC feed Coverage →

Dormant privileged identities with no recent sign-ins

kql MEDIUM Azure-Sentinel
T1078.004
IdentityInfoSigninLogs
credential-thefthuntingmicrosoftofficial
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-08-13T11:00:01Z · Confidence: medium

Hunt Hypothesis

This hunt detects adversaries leveraging compromised dormant privileged identities (T1078.004) that have retained elevated permissions despite lacking recent authentication activity for over 90 days. Proactive hunting is essential to identify and remediate these “sleeper” accounts before attackers can exploit their persistent access rights to establish a foothold or escalate privileges within the Azure Sentinel environment.

KQL Query

let lookback = 90d;
IdentityInfo
| summarize arg_max(Timestamp, *) by AccountObjectId
| where IsAccountEnabled == true
| where isnotempty(AssignedRoles) or isnotempty(PrivilegedEntraPimRoles)
| join kind=leftanti (
    SigninLogs
    | where TimeGenerated > ago(lookback)
    | where ResultType == "0"
    | project AccountObjectId = UserId
) on AccountObjectId
| extend
    AccountName = tostring(split(AccountUpn, "@")[0]),
    AccountUPNSuffix = tostring(split(AccountUpn, "@")[1])
| project
    AccountObjectId, AccountUpn, AccountName, AccountUPNSuffix, AccountDisplayName,
    BlastRadius, AssignedRoles, PrivilegedEntraPimRoles,
    Department, JobTitle
| sort by BlastRadius desc

Analytic Rule Definition

id: 0a70fd03-6f58-4df3-ab39-f9d123d538cd
name: Dormant privileged identities with no recent sign-ins
description: |
  Finds enabled identities with assigned directory or Entra PIM roles that
  have no successful sign-in in the last 90 days. These dormant privileged
  accounts retain access and can become takeover targets if credentials are
  obtained or reused.
description-detailed: |
  Leverages the Microsoft 365 Defender IdentityInfo table, which exposes
  assigned and PIM-eligible roles, BlastRadius and account enablement
  state, correlated against SigninLogs to surface identities with zero
  successful logons within the lookback. Review whether each account is
  still required, rotate credentials for any that remain, and consider
  removing unneeded role assignments or triggering just-in-time access.
  References:
  - https://learn.microsoft.com/entra/identity/role-based-access-control/groups-concept
  - https://attack.mitre.org/techniques/T1078/004/
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - IdentityInfo
  - connectorId: AzureActiveDirectory
    dataTypes:
      - SigninLogs
tactics:
  - Persistence
  - PrivilegeEscalation
relevantTechniques:
  - T1078.004
query: |
  let lookback = 90d;
  IdentityInfo
  | summarize arg_max(Timestamp, *) by AccountObjectId
  | where IsAccountEnabled == true
  | where isnotempty(AssignedRoles) or isnotempty(PrivilegedEntraPimRoles)
  | join kind=leftanti (
      SigninLogs
      | where TimeGenerated > ago(lookback)
      | where ResultType == "0"
      | project AccountObjectId = UserId
  ) on AccountObjectId
  | extend
      AccountName = tostring(split(AccountUpn, "@")[0]),
      AccountUPNSuffix = tostring(split(AccountUpn, "@")[1])
  | project
      AccountObjectId, AccountUpn, AccountName, AccountUPNSuffix, AccountDisplayName,
      BlastRadius, AssignedRoles, PrivilegedEntraPimRoles,
      Department, JobTitle
  | sort by BlastRadius desc
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: AccountUpn
      - identifier: Name
        columnName: AccountName
      - identifier: UPNSuffix
        columnName: AccountUPNSuffix
      - identifier: AadUserId
        columnName: AccountObjectId
version: 1.0.3
metadata:
  source:
    kind: Community
  author:
    name: d4rk-pri0r
  support:
    tier: Community
  categories:
    domains: [ "Security - Threat Protection", "Identity" ]

Required Data Sources

Sentinel TableNotes
IdentityInfoEnsure this data connector is enabled
SigninLogsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Here are 5 specific false positive scenarios for the “Dormant privileged identities with no recent sign-ins” rule, along with suggested filters or exclusions:

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/SigninLogs/DormantPrivilegedIdentities.yaml