When it is written
Windows writes 4726 each time a user account is deleted. Domain controllers write it for domain accounts, member servers and workstations for their local accounts. Microsoft lists it as a success event only. Deleting a computer account is a different event, 4743, which only domain controllers write under Audit Computer Account Management.
The event names the deleted account (Target Account) and the account that deleted it (Subject). Keep TargetSid: once the account is gone, Event Viewer can no longer resolve it to a name. A deleted domain account comes back with all its attributes and group memberships only if the Active Directory Recycle Bin was enabled before the deletion; restoring it from there is written as 5138 under Audit Directory Service Changes.
How to turn it on
Advanced audit policy subcategory Audit User Account Management, Success. Set it in a Group Policy object linked to the computers that write the event:
Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Account Management > Audit User Account Management| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success and Failure | Microsoft's general and stronger baselines both recommend Success and Failure auditing. Microsoft calls the subcategory useful for watching critical domain accounts (domain admins, service accounts, database admins) and recommends Failure auditing mainly for invalid password change and reset attempts on domain accounts, failed changes of the DSRM password and failed SID History additions. |
| Member servers | Success and Failure | Both baselines recommend Success and Failure auditing. Microsoft recommends watching every change to local user accounts, especially the built-in local Administrator and other critical accounts, and Failure auditing mainly for invalid password change and reset attempts on local accounts. |
| Workstations | Success and Failure | Both baselines recommend Success and Failure auditing. Microsoft recommends watching every change to local user accounts, especially the built-in local Administrator and other critical accounts, and Failure auditing mainly for invalid password change and reset attempts on local accounts. |
auditpol /get /subcategory:"User Account Management"auditpol /set /subcategory:"User Account Management" /success:enableauditpol /get /subcategory:"{0CCE9235-69AE-11D9-BED3-505054503030}"Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference
Fields
In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.
| Field | What it holds | Since |
|---|---|---|
Security IDSubjectUserSidSubject | SID of the account that deleted it. Event Viewer resolves it to a name when it can. | v0 |
Account NameSubjectUserNameSubjectRead by 1 rule | Name of the account that deleted it. The mass deletion rule groups by this field. | v0 |
Account DomainSubjectDomainNameSubject | Domain of that account, or the computer name for a local account. NT AUTHORITY for well-known principals such as LOCAL SERVICE. | v0 |
Logon IDSubjectLogonIdSubject | Logon ID of the session that made the deletion, in hexadecimal. The logon event of that session (4624) on the same computer carries the same value. | v0 |
Security IDTargetSidTarget Account | SID of the deleted account. After the deletion Event Viewer can no longer resolve it, so this is the value to keep for matching with older events. | v0 |
Account NameTargetUserNameTarget AccountRead by 1 rule | Name of the account that was deleted. | v0 |
Account DomainTargetDomainNameTarget Account | Domain of that account, as a NetBIOS or DNS name. For a local account, the name of the computer it belonged to. | v0 |
PrivilegeList | Privileges used for the operation, such as SeBackupPrivilege. Usually a dash, because Windows does not always capture them. | v0 |
Values to know
Account Name SubjectUserName
| Value | Meaning | Signal |
|---|---|---|
Same account for many targets within minutes | Bulk deletion by one accountThe mass deletion rule counts 10 or more distinct accounts in 10 minutes, a starting value. Deletion is harder to undo than disabling, so the rule has a higher level than the one for 4725. | Attack signal |
A provisioning or lifecycle account | Routine cleanupLearn its usual run size and schedule before tuning. | Expected |
Account Domain TargetDomainName
| Value | Meaning | Signal |
|---|---|---|
The domain's NetBIOS or DNS name | A domain account was deletedWritten on the domain controller that handled the deletion. | Expected |
A computer name | A local account of that computer was deletedMicrosoft recommends watching these on critical servers and administrative workstations. | Worth knowing |
Volume and noise
Microsoft rates the volume of the subcategory as low. Ordinary sources are cleanup of accounts that were disabled for a while, identity management and lifecycle tools, and administrators removing local accounts. Cleanup jobs can delete many accounts in one run, which is what the mass deletion rule has to be tuned against.
Keeping it manageable
- Keep every 4726: the mass deletion rule counts the distinct accounts one
SubjectUserNamedeletes in 10 minutes, and filtering events at collection time breaks it. - Measure what your own cleanup jobs produce per
SubjectUserSidand set the threshold above it, or give those accounts a higher threshold, rather than excluding them. - Keep a list of accounts that must never be deleted, such as service accounts, and alert on any 4726 for their
TargetSid, as Microsoft suggests. - Microsoft recommends watching every 4726 for local accounts on critical servers and administrative workstations, because local accounts are rarely deleted.
Sample event
Version 0, with made-up values.
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
<EventID>4726</EventID>
<Version>0</Version>
<Level>0</Level>
<Task>13824</Task>
<Opcode>0</Opcode>
<Keywords>0x8020000000000000</Keywords>
<TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
<EventRecordID>1048576</EventRecordID>
<Correlation />
<Execution ProcessID="712" ThreadID="2408" />
<Channel>Security</Channel>
<Computer>DC01.corp.example.com</Computer>
<Security />
</System>
<EventData>
<Data Name="TargetUserName">bob</Data>
<Data Name="TargetDomainName">CORP</Data>
<Data Name="TargetSid">S-1-5-21-1004336348-1177238915-682003330-1121</Data>
<Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1104</Data>
<Data Name="SubjectUserName">adm-alice</Data>
<Data Name="SubjectDomainName">CORP</Data>
<Data Name="SubjectLogonId">0x3a7f21</Data>
<Data Name="PrivilegeList">-</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
How do I spot mass account deletion?
Count, per `SubjectUserName`, the distinct `TargetUserName` values in 4726 over a short window. The library's rule alerts at 10 or more accounts in 10 minutes as a starting point. Read 4725 (disabled) and 4724 (resets by another account) for the same subject as well: they serve the same goal of cutting owners off.
Can a deleted account be restored, and what does that log?
With the Active Directory Recycle Bin, a deleted domain account comes back with all its attributes and group memberships, but only if the Recycle Bin was enabled before the deletion; it is not enabled by default. The restore is written as 5138 (a directory service object was undeleted) under Audit Directory Service Changes.
Is deleting a computer account written as 4726?
No. Deleting a computer account is event 4743, written only by domain controllers under Audit Computer Account Management.