When it is written
Windows writes 4731 each time a new security-enabled local group is created. On member servers and workstations that is a group in the computer's own account database, and the computer itself writes the event. On domain controllers it is a group with domain local scope in Active Directory, written by the domain controller that created it.
Group Domain (TargetDomainName) tells the two cases apart: the computer name for a group of a member server or workstation, the domain name for a domain local group. A new global group is event 4727, a new universal group event 4754. A new distribution group is not a security group and is logged under Audit Distribution Group Management instead, on domain controllers only. The subcategory has no failure events.
How to turn it on
Advanced audit policy subcategory Audit Security Group 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 Security Group Management| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success | Microsoft's general and stronger baselines both recommend Success auditing, to see security groups created, changed and deleted, members added and removed, and group membership enumerated. The subcategory has no failure events, so there is nothing to gain from Failure auditing. |
| Member servers | Success | Microsoft's general and stronger baselines both recommend Success auditing, to see security groups created, changed and deleted, members added and removed, and group membership enumerated. The subcategory has no failure events, so there is nothing to gain from Failure auditing. |
| Workstations | Success | Microsoft's general and stronger baselines both recommend Success auditing, to see security groups created, changed and deleted, members added and removed, and group membership enumerated. The subcategory has no failure events, so there is nothing to gain from Failure auditing. |
auditpol /get /subcategory:"Security Group Management"auditpol /set /subcategory:"Security Group Management" /success:enableauditpol /get /subcategory:"{0CCE9237-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 created the group. Event Viewer shows the resolved name when it can. | v0 |
Account NameSubjectUserNameSubject | Name of the account that created the group. | v0 |
Account DomainSubjectDomainNameSubject | Domain of that account, or the computer name for a local account. NT AUTHORITY for some well-known principals. | v0 |
Logon IDSubjectLogonIdSubject | Logon ID of the subject's session on the computer that wrote the event, in hexadecimal. The logon event (4624) with the same ID shows where the session came from. | v0 |
Security IDTargetSidNew Group | SID of the new group. For a domain local group the domain SID and a new RID; for a group of a member server or workstation that computer's own SID and a RID. | v0 |
Group NameTargetUserNameNew GroupRead by 1 rule | Name of the new group (shown as Group Name under New Group). | v0 |
Group DomainTargetDomainNameNew Group | Domain or computer of the new group (shown as Group Domain). The domain name for a domain local group, the computer name for a group of a member server or workstation. | v0 |
SAM Account NameSamAccountNameAttributes | Pre-Windows 2000 name of the group, the value of its sAMAccountName attribute (shown as SAM Account Name under Attributes). For a local group of a member server or workstation it is simply the group name. | v0 |
SID HistorySidHistoryAttributes | Previous SIDs of the group, from its sIDHistory attribute, set when a group is moved from another domain. A dash when there are none or when the value was not captured; always a dash for local groups of member servers and workstations. | v0 |
PrivilegesPrivilegeListAdditional Information | Privileges used for the operation. A dash when none were captured, as in Microsoft's sample event; Microsoft says only that the list might not be captured. | v0 |
Values to know
Group Name TargetUserName
| Value | Meaning | Signal |
|---|---|---|
ESX Admins | The group that domain-joined VMware ESXi hosts trust by name (CVE-2024-37085)Not a built-in group and absent by default. Microsoft reports that domain-joined hosts without VMware's update for CVE-2024-37085 give full administrative access to the members of any domain group with this name, matched by name and not by SID, even if the group did not exist when the host joined the domain. Whoever creates it and adds members gives them that access. Microsoft describes a domain group, and a local group with this name on a member server also matches the rule, so check Group Domain. A group renamed to ESX Admins is a change, not a creation, so watch the rename too (4781, 4735). | Attack signal |
Any other name | An ordinary new group | Expected |
Group Domain TargetDomainName
| Value | Meaning | Signal |
|---|---|---|
The domain's NetBIOS name | A domain local groupWritten only by domain controllers. | Worth knowing |
The computer's name | A group of that member server or workstationMicrosoft suggests checking this field when you collect 4731 from many servers. | Worth knowing |
SID History SidHistory
| Value | Meaning | Signal |
|---|---|---|
- | No SID historyThe normal value, and always the value for a local group of a member server or workstation. | Expected |
One or more SIDs | The group carries SIDs from another domainExpected when groups are migrated between domains. Outside a migration it needs an explanation, since members gain the access granted to those SIDs. | Worth knowing |
Volume and noise
Microsoft rates the volume of the whole subcategory as low. On domain controllers new domain local groups come from administrators and provisioning products creating resource groups, for example for file shares. On member servers and workstations they come from administrators and from software that creates its own local groups during installation.
Keeping it manageable
- Keep every 4731 event from domain controllers. The volume is low and the ESX Admins rule reads it.
- On member servers and workstations, new local groups are of little use to the rules: Microsoft describes the hypervisors as trusting a domain group named ESX Admins and says nothing of a local group on another computer. Filter them by
TargetDomainNameif you collect those logs. - If you have a naming convention for groups, compare
SamAccountNamewith it, as Microsoft suggests. A new group outside the convention, created by an account that does not normally create groups, deserves a look.
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>4731</EventID>
<Version>0</Version>
<Level>0</Level>
<Task>13826</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">FileShare-Finance-RW</Data>
<Data Name="TargetDomainName">CORP</Data>
<Data Name="TargetSid">S-1-5-21-1004336348-1177238915-682003330-1132</Data>
<Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1108</Data>
<Data Name="SubjectUserName">adm-bob</Data>
<Data Name="SubjectDomainName">CORP</Data>
<Data Name="SubjectLogonId">0x4a3f21</Data>
<Data Name="PrivilegeList">-</Data>
<Data Name="SamAccountName">FileShare-Finance-RW</Data>
<Data Name="SidHistory">-</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
Why does the ESX Admins rule read group creation events?
Microsoft reported that domain-joined VMware ESXi hosts without VMware's update for CVE-2024-37085 give full administrative access to members of a domain group named ESX Admins, find the group by name and not by SID, and do not need it to exist when they join the domain. Creating the group and adding an account is the whole abuse. Microsoft does not say which group scope the hosts accept, so the rule reads all three creation events, 4727, 4731 and 4754.
How do I tell a local group on a server from a domain local group?
Look at Group Domain (TargetDomainName) and at the computer that wrote the event. A group of a member server or workstation carries the computer name and is written by that computer; a domain local group carries the domain name and is written by a domain controller.
Is 4731 written when a distribution group is created?
No. Distribution groups are not security-enabled, so their creation is logged under Audit Distribution Group Management, which only domain controllers write and which Microsoft recommends only if you need it.
References
- 4731(S): A security-enabled local group was created (Microsoft)
- Audit Security Group Management (Microsoft)
- Audit Distribution Group Management (Microsoft)
- Active Directory security groups, group scope (Microsoft)
- Ransomware operators exploit ESXi hypervisor vulnerability for mass encryption (Microsoft Threat Intelligence)