1. Resources
  2. Detection sources
  3. Event ID 4898

Event ID 4898: Certificate Services loaded a template

Written by an AD CS enterprise CA for each certificate template it loads: every template at service start, a newly added one at its first enrollment. Gives the template's content and permissions, the baseline for 4899 and 4900.

Log source
Windows Security log
Detection value
Context
Volume
Low (estimate)
Last updated
Audit subcategory
Audit Certification Services (Object Access, Success and Failure)
Logged on
Certification authority servers only
Event versions
0
Detects
Not read by our detection rules yet

When it is written

Certificate templates are objects in Active Directory, and an enterprise certification authority (CA) loads the templates it issues. Microsoft documents that the CA writes 4898 to its own Security log whenever it loads a template for the first time: at the start of Certificate Services one event for each template the CA issues, and for a template added while the CA is running, at the first enrollment attempt for it. The event carries the template's name, version, schema version, OID and distinguished name, the domain controller the CA read it from, the template content and its security descriptor.

Standalone CAs do not use templates and do not write it. A later change of a loaded template's settings writes 4899, and a change of its permissions writes 4900, both at the first enrollment after the change. The event names no account.

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
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccess if needed and Failure if neededMicrosoft 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 serversSuccess if needed and Failure if neededMicrosoft 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.
WorkstationsNot loggedMicrosoft says the AD CS role cannot be installed on a client operating system.
Check the current setting
auditpol /get /subcategory:"Certification Services"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Certification Services" /success:enable /failure:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9221-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

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

Three settings must all be on, on every enterprise CA server:

  1. The Audit Certification Services subcategory, Success and Failure (Microsoft's PKI monitoring guide asks for both).
  2. The Change CA security settings category in the CA's own audit filter: the Auditing tab of the CA's properties in the Certification Authority console, or bit value 16 of the CA's AuditFilter registry value (all seven categories together are 127). Microsoft's event table names this category; its monitoring guide calls it "Change CA settings" in the same place.
  3. The policy module flag EDITF_AUDITCERTTEMPLATELOAD, which Microsoft's monitoring guide sets with certutil -setreg policy\EditFlags +EDITF_AUDITCERTTEMPLATELOAD. Restart Certificate Services afterwards, as for the audit filter.

The same settings produce 4899 (template updated) and 4900 (template security updated).

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
TemplateInternalNameInternal name of the template (the cn of the template object), shown before the version in the message.v0
TemplateVersionVersion of the template, shown after "v" in the message. A template object keeps its major version in the revision attribute and its minor version in msPKI-Template-Minor-Revision.v0
TemplateSchemaVersionSchema version of the template (msPKI-Template-Schema-Version), shown after "Schema V" in the message.v0
TemplateOIDObject identifier of the template (msPKI-Cert-Template-OID).v0
TemplateDSObjectFQDNDistinguished name of the template object in the configuration partition, below CN=Certificate Templates,CN=Public Key Services,CN=Services. Use it to find the template's 5136 events on the domain controllers.v0
Template ContentTemplateContentTemplate InformationThe template's attributes as the CA loaded them, as text (shown as Template Content). Microsoft does not document the layout, so check an event from your own CA before you parse it.v0
Security DescriptorSecurityDescriptorTemplate InformationThe template's security descriptor as the CA loaded it (shown as Security Descriptor), which decides who may enroll for the template, edit it or own it. Microsoft does not document the format; check an event from your own CA before you parse it.v0
Domain ControllerDCDNSNameAdditional InformationDNS name of the domain controller the CA read the template from (shown as Domain Controller).v0

Values to know

TemplateInternalName

ValueMeaningSignal
A template on the CA's expected listOrdinary load at service start or first useExpected
A template that is not expected on this CAA template newly published to the CA, or one you did not know it issuesMicrosoft advises alerting on it, and lists the addition of templates the CA does not normally issue among the CA activity to monitor.Attack signal

Template Content TemplateContent

ValueMeaningSignal
Enrollee supplies subject (SubjectNameEnrolleeSupplies, 0x1 in msPKI-Certificate-Name-Flag) on a template whose certificates authenticateThe requester chooses whom the certificate namesMicrosoft's PKI guide lists templates that allow "supply in request" among the template scenarios to monitor; its Defender for Identity assessments list the option on templates valid for authentication as ESC1.Attack signal
An extended key usage that authenticates or acts for others: client authentication (1.3.6.1.5.5.7.3.2), smart card logon (1.3.6.1.4.1.311.20.2.2), certificate request agent (1.3.6.1.4.1.311.20.2.1) or any purpose (2.5.29.37.0)Certificates from the template can be used to sign in or to enroll on behalf of othersReview who may enroll (SecurityDescriptor).Worth knowing

Security Descriptor SecurityDescriptor

ValueMeaningSignal
Enroll (the Certificate-Enrollment right, 0e10c968-78fb-11d2-90d4-00c04f79dc55) for Domain Users, Domain Computers or Authenticated Users on a template whose certificates authenticateEveryone in the domain can request such certificatesMicrosoft's Defender for Identity assessments flag templates with an enrollment entry for a built-in unprivileged group.Attack signal
Write property, write DACL, write owner or full control for a built-in unprivileged group or another non-administratorThe principal can rewrite the templateMicrosoft's Defender for Identity assessments name such rights for a built-in unprivileged group ESC4.Attack signal
Enroll for specific groups with a business reasonPlanned enrollment rightsExpected

Volume and noise

Low. A burst of events at every start of Certificate Services, one per template the CA issues, and a single event when a new template is first used. Microsoft's PKI event table rates the event medium and advises alerting when a template that is not expected on the CA is loaded; Appendix L of its Active Directory monitoring guidance rates it low.

Keeping it manageable

  • Keep the events of each start as the baseline of the templates the CA issues, their content and their permissions. Compare later 4899 and 4900 events, and the next start, with it.
  • Keep a list of the templates each CA is expected to issue and alert on a TemplateInternalName outside it, as Microsoft advises for this event.
  • A 4898 outside a restart is the first enrollment for a template newly added to the CA: match it with the change that published the template (it can appear as 4892, a change of the CA's template list, though Microsoft does not document which console actions write that event) and with the enrollment that followed (4886, 4887).
  • Read TemplateContent and SecurityDescriptor of templates whose certificates authenticate: an enrollee-supplied subject or an Enroll right for a broad group is the standing configuration Microsoft's template guidance asks you to review.

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>4898</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="TemplateInternalName">CorpWebServer</Data>
    <Data Name="TemplateVersion">100.4</Data>
    <Data Name="TemplateSchemaVersion">2</Data>
    <Data Name="TemplateOID">1.3.6.1.4.1.311.21.8.4718251.2013977.12519542.9831145.8806221.240.1846272.6034531</Data>
    <Data Name="TemplateDSObjectFQDN">CN=CorpWebServer,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=corp,DC=example,DC=com</Data>
    <Data Name="DCDNSName">DC01.corp.example.com</Data>
    <Data Name="TemplateContent">pKIExpirationPeriod = 1 Years
pKIExtendedKeyUsage = 1.3.6.1.5.5.7.3.1 Server Authentication
msPKI-Certificate-Name-Flag = 0x1
msPKI-Template-Minor-Revision = 4</Data>
    <Data Name="SecurityDescriptor">O:S-1-5-21-1004336348-1177238915-682003330-519G:S-1-5-21-1004336348-1177238915-682003330-519D:PAI(OA;;CR;0e10c968-78fb-11d2-90d4-00c04f79dc55;;S-1-5-21-1004336348-1177238915-682003330-1170)(A;;CCDCLCSWRPWPDTLOSDRCWDWO;;;S-1-5-21-1004336348-1177238915-682003330-512)(A;;CCDCLCSWRPWPDTLOSDRCWDWO;;;S-1-5-21-1004336348-1177238915-682003330-519)(A;;LCRPLORC;;;AU)</Data>
  </EventData>
</Event>

Attacks this event reveals

No detection rule or detection logic in our library reads this event yet. It is documented here because it sits next to the events they read: it explains them, follows from them or is the trace a defender looks for around them (see Related events).

Frequently asked questions

Why does the CA write many 4898 events at once?

At every start of Certificate Services the CA loads each template it issues and writes one 4898 for each. A single 4898 while the CA is running is the first enrollment for a template newly added to the CA.

How do I use 4898 with 4899 and 4900?

4898 records a template as the CA loaded it, with its content and security descriptor. 4899 and 4900 record later changes with the old and the new values. Comparing the 4898 events of one start with those of the previous start can also show a change that no 4899 or 4900 recorded, for example one made while the CA was stopped, since after a restart the CA loads the changed template as new.

Why does our CA never write 4898?

The event needs the Audit Certification Services subcategory, the "Change CA security settings" category in the CA's audit filter and the policy module flag EDITF_AUDITCERTTEMPLATELOAD, then a restart of Certificate Services. Standalone CAs, which do not use templates, never write it.

References