When it is written
A certification authority (CA) running Active Directory Certificate Services writes 4874 to its own Security log when attributes of a certificate request are set or changed through the CA's administration interface. Microsoft's interface for this works only on a request that is still pending. Attributes are name and value pairs such as CertificateTemplate:WebServer or san:dns=www.corp.example.com, separated by new lines. Microsoft notes that such a change does not alter the original attribute string the requester submitted: the CA keeps it unchanged, and the change shows in the request's parsed attributes.
The CA writes the event only when the Audit Certification Services subcategory is enabled on the CA server and the "Issue and manage certificate requests" category is selected in the CA's own audit filter. A domain controller logs it only if it also holds the CA role. The account that made the change is in the event data, not in the message text.
How to turn it on
Advanced audit policy subcategory Audit Certification Services, Success and Failure. 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 > Object Access > Audit Certification Services| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success if needed and Failure if needed | Microsoft marks every column "IF" (the same in its general and stronger baselines). Enable the subcategory when the server has the Active Directory Certificate Services role installed and you need to monitor AD CS events. |
| Member servers | Success if needed and Failure if needed | Microsoft marks every column "IF" (the same in its general and stronger baselines). Enable the subcategory when the server has the Active Directory Certificate Services role installed and you need to monitor AD CS events. |
| Workstations | Not logged | Microsoft says the AD CS role cannot be installed on a client operating system. |
auditpol /get /subcategory:"Certification Services"auditpol /set /subcategory:"Certification Services" /success:enable /failure:enableauditpol /get /subcategory:"{0CCE9221-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
Two settings must both be on, on every CA server:
- The Audit Certification Services subcategory, Success and Failure (Microsoft's PKI monitoring guide asks for both).
- The Issue and manage certificate requests category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value
4of the CA'sAuditFilterregistry value (all seven categories together are127). Microsoft's procedure restarts Certificate Services after the filter is changed. To read the current value on the CA:certutil -getreg CA\AuditFilter.
Microsoft notes that the audit filter alone does not make Windows write the event, and the subcategory alone does not either.
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 |
|---|---|---|
Request IDRequestIdOne or more certificate request attributes changed. | ID of the request in the CA database, a decimal number (shown as Request ID). The same ID appears in the CA's other request events (4886, 4889, 4873, 4887). | v0 |
AttributesOne or more certificate request attributes changed. | Attributes that were set, as name:value pairs separated by new lines. The CA ignores case, spaces and hyphens in attribute names and leading or trailing white space in values. | v0 |
SubjectUserSid | SID of the account that made the change. Not shown in the message text; read it from the event data (the XML or the Details tab). Event Viewer resolves it to a name. | v0 |
SubjectUserName | Name of the account that made the change. Not shown in the message text. | v0 |
SubjectDomainName | Domain of that account, as a NetBIOS name. Not shown in the message text. | v0 |
SubjectLogonId | Logon ID of the session that made the change, in hexadecimal. Matches the logon event (4624) of that session on the CA server, which gives the source address when the service that received the logon passed it to Windows; Microsoft notes that some logons carry no network details. Not shown in the message text. | v0 |
Values to know
Attributes
| Value | Meaning | Signal |
|---|---|---|
san: | A subject alternative name attribute, for example san:upn=... or san:dns=...A CA takes a SAN from request attributes only when EDITF_ATTRIBUTESUBJECTALTNAME2 is enabled. A upn= entry that names an account other than the requester is the dangerous form. | Attack signal |
CertificateTemplate: | The template the request is for | Worth knowing |
Any other name | Another request attributeMicrosoft documents that the CA ignores case, spaces and hyphens when it reads attribute names. | Worth knowing |
SubjectUserName
| Value | Meaning | Signal |
|---|---|---|
A documented certificate manager or registration workflow account | Planned handling of pending requests | Expected |
Any other account | A request changed outside the approval processMatch the RequestId to 4887 to see whether the changed request was then issued. | Attack signal |
Volume and noise
Low on most CAs. Few requests on an enterprise CA are ever pending, and Microsoft's guidance is to require a new request instead of correcting a pending one with a certificate manager action. A registration workflow or a stand-alone CA whose operators complete requests by hand can write the event as part of normal work. Microsoft rates it medium and notes that where the CA does not use this function, it may point to tampering with a request.
Keeping it manageable
- Keep every event: the volume is low and the rule matches on the event ID alone.
- Raise the priority when
Attributescontains asan:attribute, above all one with aupn=entry: that is an identity, not a server name. - Collect 4889 and 4887 from the same CA and join on
RequestId, so that a changed request can be followed to the certificate issued from it.
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>4874</EventID>
<Version>0</Version>
<Level>0</Level>
<Task>0</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>CA01.corp.example.com</Computer>
<Security />
</System>
<EventData>
<Data Name="RequestId">4131</Data>
<Data Name="Attributes">san:dns=web01.corp.example.com&dns=intranet.corp.example.com</Data>
<Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1153</Data>
<Data Name="SubjectUserName">certmgr-anna</Data>
<Data Name="SubjectDomainName">CORP</Data>
<Data Name="SubjectLogonId">0x5d2b81</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
What is a certificate request attribute?
A name and value pair that the CA keeps with a certificate request, such as the template name or a subject alternative name. Requesters can pass them when they submit a request, and a certificate manager can add or change them while the request is pending, which is what 4874 records.
Which attribute changes in 4874 matter most?
A san attribute, above all one with a upn entry, because the CA puts it into the certificate when EDITF_ATTRIBUTESUBJECTALTNAME2 is enabled and the certificate can then authenticate as that account. Follow the Request ID to 4887 and compare the Requester with the name in the attribute.
Does 4874 show what the attributes were before the change?
No. It gives the attributes that were set. The attributes the requester sent are in 4886 for the same Request ID, and Microsoft notes that the CA keeps the original attribute string unchanged.
References
- Audit Certification Services (Microsoft)
- Securing PKI: Appendix A: Events to Monitor (Microsoft)
- Securing PKI: Appendix B: Certification Authority Audit Filter (Microsoft)
- ICertAdmin::SetRequestAttributes method (Microsoft)
- Add a subject alternative name to a secure LDAP certificate (Microsoft)
- Defender for Identity: certificates security posture assessments (Microsoft)
- Review and dispose of pending certificate requests (Microsoft)
- 4624(S): An account was successfully logged on (Microsoft)