When it is written
A certification authority (CA) keeps its configuration as entries under its key in the registry (HKLM\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\<CA name>), grouped in nodes such as the policy module and the exit modules. It writes 4891 to its own Security log when an entry is changed through the CA's administration interface, for example in the CA's properties in the Certification Authority console, with the node, the entry and the new value. The account that made the change is in the event data, not in the message text.
The event needs the Audit Certification Services subcategory on the CA server and the "Change CA configuration" category in the CA's own audit filter. Microsoft's PKI guide notes that a setting changed with certutil -setreg or directly in the registry does not write the event, even with the filter set: in its example only the change made in the console does. Registry auditing of the CA's configuration key covers the other ways (event 4657).
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 Change CA configuration category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value
64of 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.
For changes made outside the console, Microsoft's PKI guide adds registry auditing: the Audit Registry subcategory and an auditing entry on HKLM\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration for this key and its subkeys. It warns against auditing the registry more broadly, which produces a very large number of events.
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 |
|---|---|---|
NodeA configuration entry changed in Certificate Services. | Node of the CA's configuration that holds the entry (shown as Node), a path below the CA's key in the registry, for example the key of the policy module. Microsoft does not document how the event writes it for entries at the top of the CA's key. | v0 |
EntryA configuration entry changed in Certificate Services. | Name of the configuration entry that changed (shown as Entry), the name of a registry value such as EditFlags or CRLPeriodUnits. | v0 |
ValueA configuration entry changed in Certificate Services. | New value of the entry (shown as Value). Microsoft does not document how the event formats numbers, so test flag entries bit by bit after converting the value. | 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
Entry
| Value | Meaning | Signal |
|---|---|---|
EditFlags | Flags of the policy moduleTurning on EDITF_ATTRIBUTESUBJECTALTNAME2 (0x40000) lets every requester add a subject alternative name to any request (ESC6 in Microsoft's Defender for Identity assessments). | Attack signal |
Active | The active policy module or exit modulesMicrosoft's registry guidance rates a change of the active modules high, because they change very rarely in normal operation. | Attack signal |
EKUOIDsForPublishExpiredCertInCRL | Which revoked certificates stay on the CRL after they expireMicrosoft warns that removing a type such as code signing can let a revoked certificate of that type validate again after the next CRL publication. | Attack signal |
CRLPeriod, CRLPeriodUnits, ValidityPeriod and similar | Routine CA maintenance | Noise |
Value
| Value | Meaning | Signal |
|---|---|---|
EditFlags with 0x40000 set | EDITF_ATTRIBUTESUBJECTALTNAME2 enabledMicrosoft describes the test for the registry event as a bitwise AND of the new value with 262144. | Attack signal |
EditFlags without 0x40000 | The flag is off | Expected |
SubjectUserName
| Value | Meaning | Signal |
|---|---|---|
A PKI administrator with a change record | Planned configuration change | Expected |
Any other account | Unplanned configuration change | Attack signal |
Volume and noise
Low. Routine CA maintenance writes it: CRL publication periods, CRL distribution point (CDP) and authority information access (AIA) locations, validity periods. Microsoft rates the event medium and suggests it for watching changes to the policy and exit modules and to the CDP and AIA extensions.
Keeping it manageable
- Keep every event: the volume is low and the rule matches on the event ID alone.
- Raise the priority by entry:
EditFlagsof the policy module, theActiveentry of the policy or exit modules, andEKUOIDsForPublishExpiredCertInCRL, which Microsoft lists among the values to watch, before CRL periods and URLs. - For
EditFlags, test the new value for theEDITF_ATTRIBUTESUBJECTALTNAME2bit (0x40000, 262144 in decimal) rather than comparing the whole number. - Add registry auditing of the CA's configuration key (event 4657) to see the same entries changed with
certutil -setregor in the registry editor.
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>4891</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="Node">PolicyModules\CertificateAuthority_MicrosoftDefault.Policy</Data>
<Data Name="Entry">EditFlags</Data>
<Data Name="Value">0x11014e</Data>
<Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1150</Data>
<Data Name="SubjectUserName">pkiadmin</Data>
<Data Name="SubjectDomainName">CORP</Data>
<Data Name="SubjectLogonId">0x4c19e2</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
How do I tell from 4891 whether the SAN flag was turned on?
Look for Entry EditFlags in the node of the policy module, and test the new Value for the bit 0x40000 (262144), which is EDITF_ATTRIBUTESUBJECTALTNAME2. Microsoft describes the same bitwise test for the registry event. With the flag on, every requester can add a subject alternative name to a request on every template.
Does every 4891 need an alert?
No. Most are routine maintenance of CRL periods, publication URLs and validity periods. The entries that change who can obtain which certificate (EditFlags, the active policy and exit modules) and EKUOIDsForPublishExpiredCertInCRL deserve one.
Can a CA setting change without 4891?
Yes. Microsoft's PKI guide shows that a setting changed with certutil -setreg or the registry editor does not write the CA event, and recommends registry auditing of the CA's configuration key for those changes.
References
- Audit Certification Services (Microsoft)
- Securing PKI: Appendix A: Events to Monitor (Microsoft)
- Securing PKI: Monitoring Public Key Infrastructure (Microsoft)
- Securing PKI: Appendix B: Certification Authority Audit Filter (Microsoft)
- ICertAdmin2::SetConfigEntry method (Microsoft)
- Defender for Identity: certificates security posture assessments (Microsoft)
- Configure and govern certification authority policy and exit modules (Microsoft)
- 4624(S): An account was successfully logged on (Microsoft)