Event ID 4767: account unlocked
What Event ID 4767 (account unlocked) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.
Event ID 4767 records an account being unlocked after a lockout. Normally that is the helpdesk or self-service. Repeated unlocks of the same account can hide an ongoing password attack.
The fields that matter
| Field | What it tells you |
|---|---|
| Target Account > Account Name | Who was unlocked. |
| Subject > Account Name | Who unlocked it. |
What is normal
Helpdesk unlocks after a user calls.
When Event ID 4767 is suspicious
- The same account locked out (4740) and unlocked again and again.
- Unlocks by an account that isn't in the helpdesk.
Common false positive: Users with old passwords on phones or mapped drives get locked out repeatedly; fix the source device.
Find Event ID 4767 with PowerShell
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4767; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
ForEach-Object {
$d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
[pscustomobject]$d
} | Format-List
Microsoft Sentinel (KQL)
SecurityEvent
| where TimeGenerated > ago(7d) and EventID == 4767
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc
Related events
- Event ID 4740: Account locked out
- Event ID 4625: Failed logon
- Event ID 4771: Kerberos pre-authentication failed
FAQ
How do I find what keeps locking an account?
The Caller Computer Name in event 4740 on the PDC emulator shows which machine sent the bad passwords.
Windows Event Triage reads a CSV, EVTX-to-JSON or XML export in your browser and flags brute force, new admins, suspicious services and log clearing.
IOC Triage, our free browser extension: right-click it for a verdict from 15 threat-intel sources, then copy a ready ticket note.