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

Event ID 4866: A trusted forest information entry was removed

Written by a domain controller when an entry is removed from the forest trust information of a forest trust: a name suffix, an excluded suffix or a domain of the partner forest. Events of one operation share an Operation ID.

Log source
Windows Security log
Detection value
Supporting
Volume
Low
Last updated
Audit subcategory
Audit Authentication Policy Change (Policy Change, Success)
Logged on
Domain controllers only
Event versions
0
Detects
1 attack (1 rule)
MITRE ATT&CK
1 technique in 2 tactics
Threat groups
2 groups that MITRE ATT&CK records using these techniques
Fields the rules read
The event ID and the provider only

When it is written

A forest trust carries a list of forest trust information: the top-level names (DNS name suffixes) the partner forest owns, names excluded from routing, and one record per domain of the partner forest with its DNS name, NetBIOS name and SID. A domain controller writes 4866 when an entry is removed from that list. Each event describes one entry, and the events of one operation share the same Operation ID with 4865 and 4867. The event has no failure version.

The list is stored on the trusted domain object (attribute msDS-TrustForestTrustInfo), which Microsoft says changes only when the trust relationship between the forests changes. Only domain controllers write the event; collect the Security log of all of them. Removing the whole trust is event 4707.

How to turn it on

Advanced audit policy subcategory Audit Authentication Policy Change, 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 > Policy Change > Audit Authentication Policy Change
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccessMicrosoft's general and stronger baselines both recommend Success auditing, which records operations on domain and forest trusts and changes to the Kerberos policy. The subcategory has no failure events.
Member serversSuccessMicrosoft's general and stronger baselines both recommend Success auditing, which records changes to logon rights and to the password policy. The subcategory has no failure events.
WorkstationsSuccessMicrosoft's general and stronger baselines both recommend Success auditing, which records changes to logon rights and to the password policy. The subcategory has no failure events.
Check the current setting
auditpol /get /subcategory:"Authentication Policy Change"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Authentication Policy Change" /success:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9230-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

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
Security IDSubjectUserSidSubjectSID of the account that removed the entry. Event Viewer shows it resolved to a name.v0
Account NameSubjectUserNameSubjectName of that account.v0
Account DomainSubjectDomainNameSubjectDomain of that account, usually as a NetBIOS name.v0
Logon IDSubjectLogonIdSubjectLogon ID of the session that removed the entry, in hexadecimal. Matches the logon event (4624) of the same session.v0
Forest RootForestRootTrust InformationName of the partner forest of the trust, as the DNS name of its root domain.v0
Forest Root SIDForestRootSidTrust InformationSID of the root domain of the partner forest (shown as Forest Root SID). Event Viewer tries to resolve it to a name.v0
Operation IDOperationIdTrust InformationIdentifier of the operation, in hexadecimal. All entries added, removed or modified in one operation share it, across 4865, 4866 and 4867.v0
Entry TypeEntryTypeTrust InformationType of the removed entry as a number. 0 a name suffix, 1 an excluded name suffix, 2 a domain record.v0
FlagsTrust InformationState flags the entry had. 0 when it was enabled. The meaning of each bit depends on the entry type.v0
Top Level NameTopLevelNameTrust InformationThe name suffix of a name entry. A dash for a domain record.v0
DNS NameDnsNameTrust InformationDNS name of the partner domain of a domain record. Microsoft says it appears as a dash when it was not captured.v0
NetBIOS NameNetbiosNameTrust InformationNetBIOS name of the partner domain of a domain record, or a dash when it was not captured.v0
Domain SIDDomainSidTrust InformationSID of the partner domain of a domain record, or NULL SID when it was not captured.v0

Values to know

Entry Type EntryType

ValueMeaningSignal
0ForestTrustTopLevelName, a DNS name suffix of the partner forestThe suffix is in TopLevelName.Worth knowing
1ForestTrustTopLevelNameEx, an excluded name suffixIts removal means the suffix is no longer excluded.Worth knowing
2ForestTrustDomainInfo, a domain of the partner forestHolds DnsName, NetbiosName and DomainSid.Worth knowing

Flags

ValueMeaningSignal
0No flag, the entry was enabledWorth knowing
1, 2, 4 or 8The entry, or part of a domain record, was disabledFor a name suffix 1 means disabled at creation, 2 by an administrator, 4 because of a conflict. For a domain record 1 and 2 are its SID (administrator, conflict), 4 and 8 its NetBIOS name.Worth knowing

Volume and noise

Very low. Entries are removed when the partner forest loses a domain or a name suffix, or when the forest trust information is reworked during a migration. Microsoft gives the event a potential criticality of Medium in its list of Active Directory events to monitor.

Keeping it manageable

  • Keep and forward every 4866. The trust settings rule reads all of 4716, 4865, 4866 and 4867, and the volume is negligible.
  • Group the events by OperationId and raise one alert per operation. A removal and an addition in the same operation can be one entry being replaced.
  • Removing an excluded name suffix (EntryType 1) widens what the trust routes to the partner forest; review those first.

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>4866</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>13569</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="ForestRoot">partner.example.net</Data>
    <Data Name="ForestRootSid">S-1-5-21-2481930475-3097621482-1748305966</Data>
    <Data Name="OperationId">0x7c0e18</Data>
    <Data Name="EntryType">0</Data>
    <Data Name="Flags">0</Data>
    <Data Name="TopLevelName">legacy.example.net</Data>
    <Data Name="DnsName">-</Data>
    <Data Name="NetbiosName">-</Data>
    <Data Name="DomainSid">S-1-0-0</Data>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1105</Data>
    <Data Name="SubjectUserName">adm-alice</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x5a3c21</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Does event 4866 mean that the trust was removed?

No. It records one entry removed from the forest trust information of a forest trust, such as a name suffix or a domain record. Removing the trust itself is event 4707.

Which removals deserve a closer look?

The removal of an excluded name suffix, after which the trust routes that suffix to the partner forest, and removals that nobody can tie to a change in the partner forest. Group the events by OperationId to see the whole change.

References