When it is written
A domain controller writes 5136 when a write changes an attribute of an Active Directory object and the object's SACL has an auditing entry that matches the write (Microsoft: the Write action for that attribute). Only successful changes are logged: a write that is refused leaves no 5136, only a 4662 failure event when Audit Directory Service Access and the object's SACL audit failures.
Each event carries one attribute and one value. Replacing a value usually gives two events with the same Correlation ID (OpCorrelationID): Value Deleted with the old value, then Value Added with the new one. Adding a value to a multi-valued attribute, such as one more servicePrincipalName, gives a single Value Added. All the events of one LDAP operation share the Correlation ID, including the 5137 of an object created and the 5139 of an object moved in it.
Microsoft's AD DS auditing guide, written for Windows Server 2008 where the event was introduced, adds what the event page leaves out. Values set while an object is created are logged as 5136 too, provided the new object's SACL (explicit entries, entries inherited from the parent and the class default) audits the write; values that AD DS assigns by itself, such as a default sAMAccountName, are not logged. Attributes changed while a deleted object is restored are logged the same way. An attribute whose searchFlags has bit 8 (value 256) set in the schema never produces a change event, on any object. And Value is not always the value that was written: binary data is replaced by the term <binary>, and long strings are cut (see the AttributeValue field).
Only the domain controller that took the write logs it: Microsoft notes that a SACL generates entries on the domain controller where the access happened, not on every domain controller that holds a replica. Collect the Security log of every domain controller.
How to turn it on
Advanced audit policy subcategory Audit Directory Service Changes, 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 > DS Access > Audit Directory Service Changes| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success | Microsoft recommends Success auditing in both its general and stronger baselines, with SACLs designed for the important objects, classes and operations (it names changes to AdminSDHolder and the Domain Admins group). The subcategory has no failure events; failed access attempts are logged by Audit Directory Service Access. |
| Member servers | Not logged | Microsoft says the subcategory makes sense only on domain controllers. |
| Workstations | Not logged | Microsoft says the subcategory makes sense only on domain controllers. |
auditpol /get /subcategory:"Directory Service Changes"auditpol /set /subcategory:"Directory Service Changes" /success:enableauditpol /get /subcategory:"{0CCE923C-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
Turning on Audit Directory Service Changes (Success) on every domain controller is only half of it: Windows writes 5136 only for an object whose SACL has an entry that audits the write. Microsoft names only the Write Property entry as the trigger and does not say what it takes to log a change of permissions (nTSecurityDescriptor). Modifying the DACL is a right of its own in Microsoft's access rights table (WRITE_DAC, shown as Modify permissions in the editor), so expect to need an entry that audits Modify permissions as well, as the default entry on the domain object and the Defender for Identity entries do, and confirm it with a test change.
What is audited out of the box. The default security descriptor of the domain object class (domainDNS) audits, for Everyone, property writes, permission changes and owner changes on the domain object itself, and writes to gPLink and gPOptions on organizational units. That is the default Microsoft's schema reference gives for Windows Server 2003 and later; the Windows 2000 Server default was one broader entry that descendants inherit (success and failure, including deletions and child creations), so read the SACL your domain object really carries. Everything else depends on the SACLs in your forest: check the Auditing tab (Advanced Features view) of the objects below and add entries where they are missing.
- Users, computers, groups, managed service accounts: on the domain root, one Success entry for Everyone per object type (descendant User, Group, Computer, msDS-GroupManagedServiceAccount and msDS-ManagedServiceAccount objects, plus msDS-DelegatedManagedServiceAccount with a Windows Server 2025 domain controller), with Full control minus List contents, Read all properties and Read permissions. This is the configuration Microsoft documents for Defender for Identity; it covers SPNs, delegation, key credentials, certificate mappings, logon scripts, UPNs, gMSA readers, dMSA links and RODC replication policies.
- AdminSDHolder (
CN=AdminSDHolder,CN=System): an entry that audits Modify permissions on the object. Microsoft recommends watching every change to it. - Group Policy (
CN=Policies,CN=System): property writes on descendant groupPolicyContainer objects. - Fine-grained password policies (
CN=Password Settings Container,CN=System): property writes on descendant msDS-PasswordSettings objects. - Configuration partition: certificate templates, the NTAuth store and CA objects (
CN=Public Key Services,CN=Services), issuance policies,dSHeuristics, authentication policies and silos, and GPO links on sites. Microsoft's Defender for Identity guidance puts an entry onCN=Configurationfor Everyone, This object and all descendant objects, Write all properties; add Modify permissions to see template permission changes. - AD-integrated DNS zones: on each zone you watch, property writes on descendant dnsNode objects.
Without a matching entry nothing is logged, so a rule that never fires may have no SACL behind it.
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 made the change. Event Viewer resolves it to a name. | v0 |
Account NameSubjectUserNameSubjectRead by 2 rules | Name of the account that made the change. Computer accounts end with $; several rules use this to tell writes by machines from writes by people. | v0 |
Account DomainSubjectDomainNameSubject | Domain of the account that made the change, usually as a NetBIOS name. | v0 |
Logon IDSubjectLogonIdSubject | Logon ID of the session that made the change, in hexadecimal. The 4624 event of the same session on this domain controller holds the client address, which 5136 does not. | v0 |
NameDSNameDirectory Service | Name of the Active Directory domain the object belongs to, as a DNS name (Microsoft's description). | v0 |
TypeDSTypeDirectory Service | Directory service type. %%14676 (Active Directory Domain Services) on domain controllers; the Windows message file also defines %%14677 for Active Directory Lightweight Directory Services. | v0 |
DNObjectDNObjectRead by 8 rules | Distinguished name of the changed object. Rules match it for fixed objects such as AdminSDHolder, the default GPOs and the NTAuth store; DNS records appear as DC= | v0 |
GUIDObjectGUIDObject | objectGUID of the changed object, in braces. It never changes, so it follows an object through renames and moves. Event Viewer resolves it to the object. | v0 |
ClassObjectClassObjectRead by 13 rules | Class of the changed object, for example user, computer, group, domainDNS, groupPolicyContainer, pKICertificateTemplate or dnsNode. | v0 |
LDAP Display NameAttributeLDAPDisplayNameAttributeRead by 36 rules | LDAP display name of the attribute that changed. Most rules select on it. | v0 |
Syntax (OID)AttributeSyntaxOIDAttribute | Syntax of the attribute as an OID, for example 2.5.5.12 (Unicode string), 2.5.5.9 (integer), 2.5.5.8 (Boolean), 2.5.5.1 (distinguished name), 2.5.5.7 (distinguished name with binary data), 2.5.5.10 (octet string) or 2.5.5.15 (security descriptor). | v0 |
ValueAttributeValueAttributeRead by 7 rules | The value that was added or deleted, depending on the operation type. Microsoft's AD DS auditing guide gives the form for each syntax. Integers appear in decimal and Booleans as TRUE or FALSE. A security descriptor (nTSecurityDescriptor and other attributes of syntax 2.5.5.15) is written whole as an SDDL string, which the replication-rights rule searches. Binary data is not logged, only the term <binary> in its place. Other string values are cut at a length set by the registry value Maximum Audit String Length under HKLM\System\CurrentControlSet\Services\NTDS\Parameters (default 1000, at most 20480), so a long string can arrive incomplete; the guide marks no such limit for security descriptors. | v0 |
TypeOperationTypeOperationRead by 36 rules | Value Added (%%14674) or Value Deleted (%%14675). Some collectors forward the code and others the text Event Viewer shows; the rules accept both. | v0 |
Correlation IDOpCorrelationIDOperation | Correlation ID shared by every event of one LDAP operation, in braces. The Value Deleted and Value Added pair of a change carry the same one, as do the other attributes written in the same request and the 5137 or 5139 of the same operation. Use it to pair an old value with its new value. | v0 |
Application Correlation IDAppCorrelationIDOperation | Application Correlation ID. Microsoft says it is not in use and always holds a dash. | v0 |
Values to know
Type OperationType
| Value | Meaning | Signal |
|---|---|---|
%%14674 | Value AddedCarries the new value. Almost every rule pairs it with an attribute name, and accepts both the code and the text because collectors forward one or the other. | Expected |
%%14675 | Value DeletedThe old value of a change, or a value that was removed. The rules for an account taken out of an authentication policy or silo and for a shorter RODC denied list read it. | Worth knowing |
%%14680 or %%14681 | Value Added With Expiration Time, Value Deleted With Expiration TimeDefined in the Windows message file next to the two codes above, but not described on Microsoft's event page. Rules that match only %%14674 and %%14675 do not see them. | Worth knowing |
LDAP Display Name AttributeLDAPDisplayName
| Value | Meaning | Signal |
|---|---|---|
nTSecurityDescriptor | Permissions, owner and auditing of the objectWatched on the domain object, AdminSDHolder, certificate templates and Tier 0 groups, accounts and domain controllers. On the domain object the new value is also searched for replication rights. | Attack signal |
servicePrincipalName | Service principal names of the accountOn a user account it makes the account a Kerberoasting target. A value that starts with the replication service GUID marks a domain controller. | Attack signal |
msDS-KeyCredentialLink | Key credentials (keys the account can sign in with)A key added by a user account is the shadow credentials pattern. Microsoft documents two legitimate writers. Microsoft Entra Connect Sync writes users' Windows Hello for Business keys to this attribute (its account is named MSOL_ when an express installation created it), and domain-joined devices provision a public key for their own computer account (Microsoft's page on that does not name the attribute). That is why the rules treat computer accounts and MSOL_ apart. The event does not hold the key itself (see AttributeValue). | Attack signal |
msDS-AllowedToActOnBehalfOfOtherIdentity or msDS-AllowedToDelegateTo | Resource-based and classic constrained delegationWho may impersonate users to this object, and to which services this account may impersonate users. On a domain controller or krbtgt the resource-based rule is critical. | Attack signal |
altSecurityIdentities | Explicit certificate mappingsA mapping lets a certificate sign in as the account; the weak forms are flagged separately (see AttributeValue). | Attack signal |
msPKI-Certificate-Name-Flag, msPKI-Enrollment-Flag, msPKI-RA-Signature, pKIExtendedKeyUsage, msPKI-Certificate-Application-Policy, msPKI-Certificate-Policy | Certificate template issuance settingsWho supplies the subject, whether approval or signatures are needed, what the certificate can be used for and which issuance policies it carries. | Attack signal |
cACertificate | CA certificate on a PKI objectOn NTAuthCertificates it adds a CA whose certificates domain controllers accept for sign-in; on Certification Authorities or AIA it adds a published CA. | Attack signal |
gPLink, gPCMachineExtensionNames, gPCUserExtensionNames, gPCFileSysPath, flags, versionNumber | Group Policy links and contentsLinking a GPO, changing which extensions run, pointing it at another SYSVOL path, disabling it. versionNumber changes with every edit, so its rule is low severity. | Attack signal |
msDS-GroupMSAMembership, msDS-ManagedAccountPrecededByLink, ms-DS-MachineAccountQuota, msDS-OIDToGroupLink | gMSA password readers, dMSA migration link, computer account quota, issuance policy to group link | Attack signal |
msDS-RevealOnDemandGroup or msDS-NeverRevealGroup | RODC password replication allowed and denied listsA member added to the allowed list (Value Added) or removed from the denied list (Value Deleted) widens what the RODC may cache. | Attack signal |
msDS-AssignedAuthNPolicy, msDS-AssignedAuthNPolicySilo, msDS-AuthNPolicySiloMembers | Authentication policy and silo assignmentRead with Value Deleted. An account removed from its policy or silo loses that protection. | Attack signal |
msDS-PSOAppliesTo, msDS-LockoutThreshold, msDS-PasswordComplexityEnabled, msDS-MinimumPasswordLength, msDS-PasswordReversibleEncryptionEnabled | Fine-grained password policy (PSO) scope and settings | Attack signal |
scriptPath, userPrincipalName, dSHeuristics, dnsRecord | Logon script, UPN, forest-wide directory behavior, DNS record data | Attack signal |
Class ObjectClass
| Value | Meaning | Signal |
|---|---|---|
domainDNS | The domain objectIts default SACL audits writes and permission changes. A permission change on it is always worth a look. | Attack signal |
pKICertificateTemplate | Certificate template | Attack signal |
groupPolicyContainer | Group Policy objectThe Default Domain Policy ({31B2F340-016D-11D2-945F-00C04FB984F9}) and Default Domain Controllers Policy ({6AC1786C-016F-11D2-945F-00C04FB984F9}) are matched by name in ObjectDN. | Attack signal |
dnsNode | Record in an AD-integrated DNS zoneMostly dynamic updates. The rules look only at names that start with * (wildcard) or wpad. | Worth knowing |
msDS-PasswordSettings | Fine-grained password policy | Worth knowing |
user or inetOrgPerson | User accountThe SPN rule is limited to these classes; on computers SPNs change routinely. | Worth knowing |
Value AttributeValue
| Value | Meaning | Signal |
|---|---|---|
Contains 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 followed by ;;S-1-5-21-, ;;DU), ;;DC), ;;AU) or ;;WD) | An ACE that grants Replicating Directory Changes All to a domain account, Domain Users, Domain Computers, Authenticated Users or EveryoneRead on the domain object's nTSecurityDescriptor. By default the domain's security descriptor gives this right to domain controllers and the administrator groups only. | Attack signal |
Starts with E3514235-4B06-11D1-AB04-00C04FC2DCD2/ | The replication (DRS) service principal name of a domain controllerStandard on every domain controller account. Written anywhere else, or outside a planned promotion, it is what registering a rogue domain controller needs. | Attack signal |
<S> or <RFC822> | Certificate mapping by subject or by email addressIn altSecurityIdentities. KB5014754 classes these mapping types as weak; the XML writes the markers as <S> and <RFC822>. | Attack signal |
TRUE, FALSE, 0, 0 to 7 | Weakened password policy valuesTRUE in msDS-PasswordReversibleEncryptionEnabled, FALSE in msDS-PasswordComplexityEnabled, 0 in msDS-LockoutThreshold, 0 to 7 in msDS-MinimumPasswordLength. | Attack signal |
1, 2 or 3 | GPO user settings, computer settings or both disabledIn the flags attribute of a groupPolicyContainer. | Attack signal |
No @ in a userPrincipalName | A UPN without a domain partSuch a UPN can collide with the logon name of another account. | Attack signal |
<binary> | A binary value, which Windows does not write to the eventMicrosoft's AD DS auditing guide says binary values are replaced by this term, in the system language, and that a value of syntax 2.5.5.7 keeps its DN and loses its binary part (B:<length>:<binary>:<DN>). It is what to expect for cACertificate and dnsRecord (syntax 2.5.5.10) and for msDS-KeyCredentialLink (2.5.5.7), so the event proves the write but not what was written. The Windows message file defines %%14672 for the term; a collector may forward that code, so check an event of your own. | Worth knowing |
Volume and noise
Microsoft rates Audit Directory Service Changes high on domain controllers, but the volume of 5136 is set by your SACLs, not by the subcategory. With only the default entries you see little beyond changes to the domain object itself and to Group Policy links on organizational units. Write auditing on every user, computer and group, as Microsoft's setup for Defender for Identity does, brings in all routine administration: group membership edits (member), help desk changes, and the writes computers make to their own accounts after joining the domain (dNSHostName, servicePrincipalName).
Every changed value is a separate event and a replaced value is two, so one administrative action can produce many events with the same Correlation ID. Audited DNS zones add a steady stream from dynamic DNS registrations, and each Group Policy edit changes the GPO's versionNumber.
Keeping it manageable
- Never filter on
OperationTypeat collection time: most rules readValue Added, but the authentication policy and RODC replication policy rules readValue Deleted, and the deleted value is the only record of what a change replaced. - Where volume is the limit, filter on
AttributeLDAPDisplayNamerather than on objects: keep the attributes listed under the values worth knowing and drop high-churn ones that no rule reads, such asmember(group membership changes are also logged as 4728, 4732 and 4756). - Narrow the SACLs instead of the events, as Microsoft advises: audit the classes and attributes you need on the containers that hold them, rather than every write on every object.
- In audited DNS zones the bulk is dynamic updates written by computer accounts. Keep every
dnsNodeevent whoseObjectDNstarts withDC=*,orDC=wpad,, and everydnsNodechange made by an account that is not a computer account: a hypothesis follows names that user accounts create and remove again.
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>5136</EventID>
<Version>0</Version>
<Level>0</Level>
<Task>14081</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="OpCorrelationID">{8b1f4c2e-7d3a-4e9b-a6c5-2f0e1d9b3a74}</Data>
<Data Name="AppCorrelationID">-</Data>
<Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1105</Data>
<Data Name="SubjectUserName">alice</Data>
<Data Name="SubjectDomainName">CORP</Data>
<Data Name="SubjectLogonId">0x3e5a21</Data>
<Data Name="DSName">corp.example.com</Data>
<Data Name="DSType">%%14676</Data>
<Data Name="ObjectDN">CN=svc-sql,OU=Service Accounts,DC=corp,DC=example,DC=com</Data>
<Data Name="ObjectGUID">{3c9d7e21-5a4b-4f6e-9b2d-8e1a7c0f4d55}</Data>
<Data Name="ObjectClass">user</Data>
<Data Name="AttributeLDAPDisplayName">servicePrincipalName</Data>
<Data Name="AttributeSyntaxOID">2.5.5.12</Data>
<Data Name="AttributeValue">MSSQLSvc/SQL01.corp.example.com:1433</Data>
<Data Name="OperationType">%%14674</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Detection logic (hypotheses that join this event with others) for:
Frequently asked questions
Why is there no 5136 for a change I just made?
Windows writes 5136 only when Audit Directory Service Changes is on for the domain controller that took the write and the object's SACL has an auditing entry that matches it. Check the subcategory with auditpol, then the Auditing tab of the object in the Advanced Features view. Microsoft also notes that some objects and attributes never generate events because of settings in the schema. Its AD DS auditing guide names one such setting, bit 8 (value 256) of an attribute's searchFlags, which stops change events for that attribute on every object.
How do I see the old and the new value of a change?
Replacing a value produces two events with the same Correlation ID, Value Deleted with the old value and Value Added with the new one. Group the events by OpCorrelationID and read both. A value added to a multi-valued attribute has no Value Deleted partner.
Which 5136 events point to DCSync rights being granted?
A Value Added for nTSecurityDescriptor on the domain object (ObjectClass domainDNS) whose new value contains an ACE for 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 (Replicating Directory Changes All) naming an account or a broad group. By default the domain's security descriptor gives the right to domain controllers and the administrator groups only. The domain object's default SACL audits permission changes, so expect this to work without extra setup once the subcategory is on, and confirm it with a test change.
Is 5136 logged again when the change replicates to other domain controllers?
No. Microsoft says a SACL generates log entries only on the domain controller where the access happened, not on every domain controller with a replica. You need the Security log of every domain controller to see every change.
References
- 5136(S): A directory service object was modified (Microsoft)
- Audit Directory Service Changes (Microsoft)
- Active Directory Domain Services (AD DS) Auditing Step-by-Step Guide (Microsoft)
- Domain-DNS class, default security descriptor (Microsoft)
- Configure Windows event auditing, Defender for Identity (Microsoft)
- Retrieving an object's SACL (Microsoft)
- DS-Replication-Get-Changes-All extended right (Microsoft)
- How to configure SPN, the DRS replication SPN of domain controllers (Microsoft)
- KB5014754: Certificate-based authentication changes on Windows domain controllers (Microsoft)
- 4662(S, F): An operation was performed on an object, access rights table (Microsoft)
- How Windows Hello for Business works (Microsoft)
- Domain-joined Device Public Key Authentication (Microsoft)
- Microsoft Entra Connect: Accounts and permissions, the AD DS Connector account (Microsoft)
- Schema updates in Windows Server (Microsoft)