← Back to SOC feed Coverage →

Active Directory Account lockout and unlocks

kql MEDIUM Azure-Sentinel
IdentityDirectoryEvents
huntingmicrosoftofficial
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-23T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may attempt to brute force credentials by repeatedly locking out and unlocking Active Directory accounts to evade detection. SOC teams should proactively hunt for this behavior to identify potential credential compromise attempts in their Azure Sentinel environment.

KQL Query

IdentityDirectoryEvents
| where ActionType == 'Account Unlock changed'
| extend AccountLockStatus = iif(tobool(parse_json(AdditionalFields)['TO Account Unlock']), 'Locked', 'Unlocked')

Analytic Rule Definition

id: 9f384f37-ff17-446d-b49a-40c6fb98b1ba
name: Active Directory Account lockout and unlocks
description: |
  This query lists Active Directory accounts lockout and unlock events
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - IdentityDirectoryEvents
tactics:
- Initial Access
relevantTechniques: []
query: |
    IdentityDirectoryEvents
    | where ActionType == 'Account Unlock changed'
    | extend AccountLockStatus = iif(tobool(parse_json(AdditionalFields)['TO Account Unlock']), 'Locked', 'Unlocked')
version: 1.0.0
metadata:
    source:
        kind: Community
    author:
        name: Martin Schvartzman
    support:
        tier: Community
    categories:
        domains: [ "Security - Identity" ]

Required Data Sources

Sentinel TableNotes
IdentityDirectoryEventsEnsure 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/Initial access/ActiveDirectory_Account_lockout_and_unlocks.yaml