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

Event ID 4865: A trusted forest information entry was added

Written by a domain controller when an entry is added to 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 4865 when an entry is added to that list. Each event describes one entry, and the events of one operation share the same Operation ID, which 4866 and 4867 use as well. 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, for example when the topology of the trusted forest changes. Only domain controllers write the event; collect the Security log of all of them. A new forest trust itself is event 4706.

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 added 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 added 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 entry as a number. 0 a name suffix, 1 an excluded name suffix, 2 a domain record. Microsoft's API headers define later record types that the event page does not list.v0
FlagsTrust InformationState flags of the entry. 0 when it is enabled. The meaning of each bit depends on the entry type (name suffix or domain record).v0
Top Level NameTopLevelNameTrust InformationThe name suffix of a name entry. A dash for a domain record, as in Microsoft's sample.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 suffixWorth knowing
2ForestTrustDomainInfo, a domain of the partner forestHolds DnsName, NetbiosName and DomainSid. The type of Microsoft's sample event.Worth knowing

Flags

ValueMeaningSignal
0No flag, the entry is enabledExpected
1Name suffix disabled when it was created (LSA_TLN_DISABLED_NEW); for a domain record, its SID disabled by an administrator (LSA_SID_DISABLED_ADMIN)Worth knowing
2Name suffix disabled by an administrator (LSA_TLN_DISABLED_ADMIN); for a domain record, its SID disabled because of a conflict (LSA_SID_DISABLED_CONFLICT)Worth knowing
4Name suffix disabled because of a conflict (LSA_TLN_DISABLED_CONFLICT); for a domain record, its NetBIOS name disabled by an administrator (LSA_NB_DISABLED_ADMIN)Worth knowing
8For a domain record, its NetBIOS name disabled because of a conflict (LSA_NB_DISABLED_CONFLICT)Worth knowing

Volume and noise

Very low. Entries are added when a forest trust is set up and when the partner forest gains a domain or a name suffix. 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 4865. 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, with the list of entries, rather than one per entry.
  • Check new domain records (EntryType 2) against the domains you expect in the partner forest: each record names a domain, with its SID, that the forest trust covers.

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>4865</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">0x7b21c4</Data>
    <Data Name="EntryType">2</Data>
    <Data Name="Flags">0</Data>
    <Data Name="TopLevelName">-</Data>
    <Data Name="DnsName">partner.example.net</Data>
    <Data Name="NetbiosName">PARTNER</Data>
    <Data Name="DomainSid">S-1-5-21-2481930475-3097621482-1748305966</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 4865 mean that a new trust was created?

No. It records an entry added to the forest trust information of an existing forest trust, such as a name suffix or a domain of the partner forest. A new trust is event 4706. Setting up a forest trust can produce both.

How do I tell which events belong to one change?

Microsoft describes Operation ID as the identifier of the operation and says it correlates 4865 with 4866 and 4867. Group the events by OperationId to see every entry one change added, removed or modified.

Which entries deserve a closer look?

A domain record (EntryType 2) for a domain you do not expect in the partner forest, and name suffixes that overlap your own namespace. Compare the entries with the domains and suffixes the partner forest really owns.

References