Security · Account
4740 · A user account was locked out
Event 4740 is logged when an account is locked out after exceeding the bad-password threshold. For domain accounts it is recorded on the domain controller that processed the lockout and on the PDC emulator, and its Caller Computer Name shows the machine the bad attempts came from. That makes it the go-to event for finding both password attacks and the device holding a stale saved password.
Where it is logged
TargetDomainName.Key fields to read
| Field | What it tells you |
|---|---|
| TargetUserName | Account that was locked out. |
| TargetDomainName | Shown as Caller Computer Name: the host the failed attempts came from (may be blank for some sources). |
| TargetSid | SID of the locked account. |
| SubjectUserName | The DC computer account that processed the lockout, e.g. NW-DC-01$. |
| Computer | Domain controller that logged the event; check the PDC emulator for a complete view. |
Sample event
EventID: 4740
TimeCreated: 2026-03-14T08:12:04.996Z
Computer: NW-DC-01.northwind.local
SubjectUserSid: S-1-5-18
SubjectUserName: NW-DC-01$
SubjectDomainName: NORTHWIND
SubjectLogonId: 0x3E7
TargetUserName: m.okafor
TargetDomainName: NW-FIN-WS07
TargetSid: S-1-5-21-3623811015-3361044348-30300820-1188How to triage it
- 1Read Caller Computer Name (
TargetDomainName) to find where the bad attempts originated; resolve it to an owner and IP. - 2Count lockouts in the window: one account repeatedly locked from the same internal device suggests stale credentials; many accounts locked from one source suggests spraying or brute force.
- 3On the caller machine, pull 4625s for the account (and on DCs 4771/4776) to see the logon type, process and source IP of the failures.
- 4If the caller is an external-facing server (VPN, OWA, RDS gateway), look at its own logs for the real client IP.
- 5Check whether any successful 4624 or 4768 for the account followed from an unusual source, then contact the user and escalate if attack-driven.
Benign vs suspicious
Usually benign
- Stale passwords saved on phones (ActiveSync), mapped drives, disconnected RDP sessions or services after a password change.
- Users repeatedly mistyping their password.
- Scripts or scheduled tasks running with an old password.
Red flags
- Many different accounts locked out within minutes, especially with the same caller computer.
- Lockouts of admin, service or executive accounts with an unknown or external-facing caller.
- Caller Computer Name that is not a known asset or has a random name.
- Lockouts followed by a successful logon from an unusual IP or a helpdesk reset request the user did not make.
Hunt for it: Splunk & KQL
index=wineventlog EventCode=4740
| stats count dc(user) AS accounts values(user) AS locked_users BY Caller_Computer_Name
| sort - accountsSecurityEvent
| where TimeGenerated > ago(1d)
| where EventID == 4740
| project TimeGenerated, Computer, TargetUserName, CallerComputer = TargetDomainName
| summarize Lockouts = count(), Accounts = dcount(TargetUserName), Users = make_set(TargetUserName) by CallerComputer
| order by Accounts descField names depend on your add-on and table. More translations in the Splunk vs KQL cheat sheet.
Interview question
“A user keeps getting locked out every morning. How do you find the cause?”
✓ Strong answer sketch
I search for Event 4740 on the domain controllers, ideally the PDC emulator, and read the Caller Computer Name, which tells me which machine sent the bad passwords. If it is the same internal device each time, I go to that host's 4625s or the DC's 4771/4776 to see the process or logon type, which usually reveals a stale saved credential such as a phone mail client, a mapped drive or a service. If the caller is a VPN or webmail server, I check that server's logs for the real client IP. If many accounts are being locked from one source, I treat it as password spraying instead and escalate.
Frequently asked questions
What does Event ID 4740 mean?
Event ID 4740 means a user account was locked out because it exceeded the bad-password threshold. It records the locked account and the Caller Computer Name the failed attempts came from.
Where is the account lockout source logged?
In Event 4740 on the domain controller, most reliably the PDC emulator, in the Caller Computer Name field (stored as TargetDomainName in the XML). Then check that computer's 4625 events or the DC's 4771/4776 events for detail.
Why is Caller Computer Name blank in 4740?
Some authentication paths, such as certain web or NTLM proxy scenarios, do not pass a workstation name. In that case use 4771 or 4776 on the DCs, which include the client address or workstation, to trace the source.