Active Directory trusts: forest trusts and selective authentication

Companies merge, sign up suppliers as partners and split into divisions, and when that happens their users often need to reach each other’s servers. Active Directory trusts make that possible: users from one domain or forest can sign in to resources in another without anyone creating duplicate accounts for them.

Here you’ll build a small partner forest called partner.internal, set up DNS in both directions and create a two-way forest trust. Then you’ll lock it down with selective authentication and give one partner group access to a single share on SRV01.

TimeYou needBy the end you can
About 90 minutesDC01, DC02 and SRV01, plus a new Server Core VM (2 GB RAM, 40 GB disk) for the partner forestCreate and verify forest trusts, configure conditional forwarders, use selective authentication and SID filtering, and fix DNS and authentication-firewall errors

What it is, in one line

Active Directory trusts are links between domains or forests that let accounts from one side (the trusted side) be authenticated and given access on the other side (the trusting side).

In Simple Words

Two schools sharing a library

Imagine two schools that agree to share their libraries. A student from School B walks into School A’s library with her own school ID, and the librarian lets her in because the two schools trust each other’s cards. School A doesn’t print her a new card, it checks with School B, and it still decides what visitors can do: maybe they can read in the library but can’t use the science lab. A trust is that agreement, and selective authentication is School A saying “visitors may go only into the rooms we list” instead of the whole building.

Engineer's View

Trust types, direction and security

Direction: if domain A trusts domain B, then users from B can get to resources in A, so access runs the opposite way to the trust arrow. A two-way trust is really two one-way trusts, and domains inside the same forest already trust each other transitively through the automatic parent-child and tree-root trusts.

Types: forest trusts join two forest roots and are transitive across all the domains in both; external trusts join two specific domains; shortcut trusts make authentication faster inside a big forest; and realm trusts connect you to Kerberos realms that aren’t Windows.

Requirements: each side has to resolve the other’s DNS names (with conditional forwarders or stub zones), the clocks have to agree for Kerberos to work, and the DCs need the right ports open between them (DNS, Kerberos 88, LDAP 389, RPC and SMB 445).

Security: with forest-wide authentication, users from the other forest count as “Authenticated Users” in yours, just like your own staff. Selective authentication blocks them unless they’ve been granted “Allowed to authenticate” on specific computers. SID filtering is on by default for forest trusts and strips foreign SIDs out of tickets, so an admin in the partner forest can’t pretend to be a member of your groups.

How it works, step by step

Here’s what happens when a partner user opens a share in saatlab.internal:

Active Directory trusts: a partner user reaches a share across a forest trust

The partner’s DC vouches for the user, the saatlab.internal DC issues a ticket for SRV01, and SRV01 checks the selective authentication right before it even looks at NTFS permissions. None of this works unless DNS resolves across both forests.

This is how the two forests look once you finish:

Active Directory trusts lab: saatlab.internal and partner.internal with a two-way forest trust
  1. Build PDC1, a Server Core DC for partner.internal on LabNet (10.0.0.30).
  2. DNS: conditional forwarders in both directions.
  3. Trust: a two-way forest trust, created and verified from saatlab.internal.
  4. Lock down: selective authentication on the saatlab side, and “Allowed to authenticate” on SRV01 only.
  5. Access: PARTNER\GG_Partners gets a Partner share on SRV01.

If your laptop has 8 GB of RAM, run DC01, SRV01 and PDC1 for this lesson and keep DC02 switched off.

Hands-on Lab: Active Directory trusts with a partner forest

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

Start DC01 and SRV01. You’ll create PDC1 from your laptop and then do the rest on DC01, signed in as SAATLAB\adm.rahul, in PowerShell as administrator.

1Create and install PDC1

On your laptop:

VBoxManage createvm --name PDC1 --ostype Windows2025_64 --basefolder C:\Lab\VMs --register --default
VBoxManage modifyvm PDC1 --memory 2048 --cpus 2 --nic1 natnetwork --nat-network1 LabNet
VBoxManage createmedium disk --filename C:\Lab\VMs\PDC1\PDC1.vdi --size 40960
VBoxManage storageattach PDC1 --storagectl SATA --port 0 --device 0 --type hdd --medium C:\Lab\VMs\PDC1\PDC1.vdi
VBoxManage storageattach PDC1 --storagectl SATA --port 1 --device 0 --type dvddrive --medium C:\Lab\ISO\server2025.iso
VBoxManage startvm PDC1

Install Windows Server 2025 Datacenter Evaluation without Desktop Experience, set the Administrator password, and pick option 15 in sconfig to get to PowerShell.

On PDC1, set up the network and build the partner forest:

New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.30 -PrefixLength 24 -DefaultGateway 10.0.0.1 | Out-Null
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 127.0.0.1
Rename-Computer -NewName PDC1 -Restart

Once it has restarted, run this on PDC1:

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools | Out-Null
Install-ADDSForest -DomainName partner.internal -DomainNetbiosName PARTNER -InstallDns -Force

Type a DSRM password when it asks. PDC1 restarts as the first DC of partner.internal, and from then on you sign in as PARTNER\Administrator.

✅ Checkpoint: PDC1 is the DC of partner.internal at 10.0.0.30.

2Make each forest resolve the other

On DC01:

Add-DnsServerConditionalForwarderZone -Name partner.internal -MasterServers 10.0.0.30 -ReplicationScope Forest
Resolve-DnsName -Type SRV _ldap._tcp.dc._msdcs.partner.internal | Select-Object NameTarget

On PDC1:

Add-DnsServerConditionalForwarderZone -Name saatlab.internal -MasterServers 10.0.0.10, 10.0.0.11
Resolve-DnsName -Type SRV _ldap._tcp.dc._msdcs.saatlab.internal | Select-Object NameTarget

You should see something like this (on DC01, then PDC1):

NameTarget
----------
PDC1.partner.internal

NameTarget
----------
DC01.saatlab.internal
DC02.saatlab.internal

A conditional forwarder sends queries for one domain straight to the DNS servers you name. Because -ReplicationScope Forest stores it in AD, DC02 picks it up as well. When a trust fails, a missing forwarder is the most common reason, so don’t skip this step.

✅ Checkpoint: Each forest finds the other’s DC SRV records.

3Create and verify a two-way forest trust

On DC01, create the trust using the partner forest’s admin credentials:

$cred = Get-Credential PARTNER\Administrator
$ctx = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext('Forest', 'partner.internal', $cred.UserName, $cred.GetNetworkCredential().Password)
$partner = [System.DirectoryServices.ActiveDirectory.Forest]::GetForest($ctx)
$local = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
$local.CreateTrustRelationship($partner, 'Bidirectional')
Get-ADTrust -Filter * | Select-Object Name, Direction, ForestTransitive, SelectiveAuthentication, SIDFilteringForestAware

You should see something like this:

Name             Direction     ForestTransitive SelectiveAuthentication SIDFilteringForestAware
----             ---------     ---------------- ----------------------- -----------------------
partner.internal BiDirectional True             False                   False

That one command built both sides of the trust, which is why it needed admin rights in both forests. At a real company the two sets of admins usually create their own side in domain.msc (Active Directory Domains and Trusts), using a trust password they’ve agreed on.

Verify it:

netdom trust saatlab.internal /domain:partner.internal /verify /twoway /UserO:PARTNER\Administrator /PasswordO:*

You should see something like this:

Type the password associated with the object user:
The trust between saatlab.internal and partner.internal has been successfully verified
The command completed successfully.

✅ Checkpoint: Get-ADTrust shows a BiDirectional forest trust and netdom verifies it.

4Turn on selective authentication and allow only SRV01

On PDC1, make a partner user and a group:

New-ADGroup -Name GG_Partners -GroupScope Global -GroupCategory Security
New-ADUser -Name 'Anil Kumar' -SamAccountName anil.kumar -UserPrincipalName anil.kumar@partner.internal -AccountPassword (Read-Host -AsSecureString 'Password') -Enabled $true
Add-ADGroupMember GG_Partners -Members anil.kumar

On DC01, switch the trust to selective authentication for partner users and then allow GG_Partners on SRV01 and nowhere else:

netdom trust saatlab.internal /domain:partner.internal /SelectiveAuth:Yes
dsacls "CN=SRV01,OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal" /G "PARTNER\GG_Partners:CA;Allowed to Authenticate"
Get-ADTrust partner.internal | Select-Object Name, SelectiveAuthentication

You should see something like this (after dsacls lists the permissions):

Selective Authentication for this trust has been enabled.
The command completed successfully.
...
The command completed successfully

Name             SelectiveAuthentication
----             -----------------------
partner.internal                    True

Partner users can now authenticate to SRV01 and to nothing else in saatlab.internal. “Allowed to Authenticate” is a control access right (CA) on the computer object, and you can also set it from the Security tab of SRV01 in ADUC once Advanced Features is turned on.

✅ Checkpoint: SelectiveAuthentication is True and GG_Partners has Allowed to Authenticate on SRV01.

Active Directory trusts lab: Get-ADTrust and netdom verify the forest trust
A verified two-way forest trust with selective authentication turned on.

5Give partner users a share on SRV01 and test it

On SRV01:

New-Item -ItemType Directory D:\Shares\Partner -Force | Out-Null
icacls D:\Shares\Partner /inheritance:r /grant:r "SYSTEM:(OI)(CI)F" "BUILTIN\Administrators:(OI)(CI)F" "PARTNER\GG_Partners:(OI)(CI)M" | Out-Null
New-SmbShare -Name Partner -Path D:\Shares\Partner -ChangeAccess 'PARTNER\GG_Partners' -FullAccess 'SAATLAB\Domain Admins' | Out-Null

On PDC1, connect as Anil and write a file to the share:

$anil = Get-Credential PARTNER\anil.kumar
New-PSDrive -Name P -PSProvider FileSystem -Root \\SRV01.saatlab.internal\Partner -Credential $anil | Out-Null
'Delivery schedule for October' | Set-Content P:\schedule.txt
Get-ChildItem P:\ | Select-Object Name

You should see something like this:

Name
----
schedule.txt

✅ Checkpoint: Anil from partner.internal wrote schedule.txt to the Partner share on SRV01.

Break It, Then Fix It

When a trust breaks, it’s nearly always one of two things: one forest can’t find the other, or the authentication firewall is saying no.

1Break it: the partner can’t resolve saatlab.internal

On PDC1, delete the conditional forwarder and clear the DNS cache:

Remove-DnsServerZone saatlab.internal -Force
Clear-DnsServerCache -Force

Back on DC01, verify the trust again:

netdom trust saatlab.internal /domain:partner.internal /verify /twoway /UserO:PARTNER\Administrator /PasswordO:*

You’ll get an error like this:

The trust between saatlab.internal and partner.internal could not be verified.

The specified domain either does not exist or could not be contacted.

The command failed to complete successfully.

DC01 can still find partner.internal, but PDC1 has lost track of saatlab.internal’s DCs, so the two-way check fails on the way back. Users from saatlab.internal wouldn’t be able to reach anything in the partner forest either.

To fix it, add the forwarder back on PDC1 and run the verification again:

Add-DnsServerConditionalForwarderZone -Name saatlab.internal -MasterServers 10.0.0.10, 10.0.0.11   # on PDC1
netdom trust saatlab.internal /domain:partner.internal /verify /twoway /UserO:PARTNER\Administrator /PasswordO:*   # on DC01

✅ Checkpoint: Verification failed without the forwarder and succeeded after it was recreated.

2Break it: the authentication firewall

On DC01, take the Allowed to Authenticate right off SRV01:

dsacls "CN=SRV01,OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal" /R "PARTNER\GG_Partners"

On PDC1, connect as Anil once more, using a fresh connection:

Remove-PSDrive P -ErrorAction SilentlyContinue; klist purge | Out-Null
New-PSDrive -Name P -PSProvider FileSystem -Root \\SRV01.saatlab.internal\Partner -Credential $anil

You’ll get an error like this:

New-PSDrive : The computer you are signing into is protected by an authentication firewall. The specified account is
not allowed to authenticate to the computer.

The share and NTFS permissions still let GG_Partners in, but selective authentication stops Anil before Windows even gets to them. On the DC you’ll see event 4769 failures for the service ticket in the Security log. Whenever you see this message, it tells you the trust is using selective authentication.

To fix it, grant the right again, and only on the computers partners genuinely need:

dsacls "CN=SRV01,OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal" /G "PARTNER\GG_Partners:CA;Allowed to Authenticate"

✅ Checkpoint: Anil got the authentication firewall error without the right, and connects again after it’s restored.

Active Directory trusts lab: authentication firewall error from selective authentication
Take away “Allowed to authenticate” on SRV01 and the authentication firewall turns Anil away before any permission is checked.

This happened at work

The merger that opened every share

This one came out of an acquisition. The IT team set up a two-way forest trust so the new staff could reach the shared HR portal, it worked on day one, and everyone moved on to other things. About a year later an audit turned up something nobody expected: users from the acquired company could read dozens of file shares, project folders and old exports, and not one of them had been shared on purpose. Those folders gave read access to “Authenticated Users”, and with forest-wide authentication every user in the trusted forest counted as authenticated.

So the team switched the trust to selective authentication, granted “Allowed to authenticate” only on the servers the new staff needed, and swapped Authenticated Users for specific groups on the sensitive shares.

The fix: every trust now starts with selective authentication, and a quarterly report lists anything granted to Authenticated Users or Everyone. The lesson: a forest trust can quietly turn “everyone in the company” into “everyone in two companies”, so start narrow and open things up on purpose.

Common mistakes and troubleshooting

Mistake or symptomWhat happensWhat to do instead
“The specified domain either does not exist or could not be contacted”DNS can’t find the other forest’s DCsConditional forwarders or stub zones on both sides
“protected by an authentication firewall”Selective authentication without the rightGrant Allowed to authenticate on the needed computers
Forest-wide authentication by defaultPartner users get Authenticated Users access everywhereSelective authentication; tighten AU permissions
Getting the trust direction backwardsAccess works the wrong wayRemember: access flows against the trust arrow
Disabling SID filteringA partner admin could fake membership of your groupsKeep SID filtering on
Clock difference between forestsKerberos failures across the trustBoth forests sync time from reliable sources
Firewalls between forestsTrust creation or sign-ins failOpen DNS, Kerberos, LDAP, RPC and SMB between DCs
External trust where a forest trust fitsNo transitivity to other domainsForest trust between forest roots
Forgetting old trustsUnused paths into your domainReview and remove trusts nobody uses

Interview questions

Click a question to open it. Each one is worded the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.

Fresher level

1. Can you explain in simple words what a trust is in Active Directory?

Why they ask this: Before they get into direction and security, they want to be sure you’ve got the basic idea.

How you might answer: A trust is a relationship between two domains or forests. It lets users from one side be authenticated and then given access to resources on the other side, because without it a server in one forest has no way to check who a user from the other forest is.

2. Domain A trusts domain B. Which users can get access to which resources?

Why they ask this: Trust direction trips a lot of people up, so they want to hear that you know access flows the opposite way to the trust.

How you might answer: Users in B can be given access to resources in A. The way I remember it, A trusts B, so A is willing to let B’s people in. But the trust only makes access possible; someone in A still has to grant permissions to those users or groups.

3. You add a new child domain to an existing forest. Do you need to create trusts to the other domains by hand?

Why they ask this: They’re checking whether you know that domains inside one forest already trust each other.

How you might answer: No, domains in the same forest trust each other automatically through transitive parent-child and tree-root trusts. I’d only create a trust by hand to connect to a different forest or an outside domain.

2–5 years experience

4. What is selective authentication on a trust, and why would you turn it on?

Why they ask this: They want to see that you think about security on a trust and don’t stop once access works.

How you might answer: With selective authentication, users from the trusted forest can’t authenticate to whatever computer they like, only to computers where they’ve been given the “Allowed to authenticate” right. I’d switch it on when I don’t fully trust the other forest, so that I decide which servers their users can reach.

5. You’re asked to set up a forest trust with a partner company tomorrow. What would you check is ready first?

Why they ask this: They’re trying to find out if you’ve set one up for real, because most trust failures come from missing basics like DNS and time.

How you might answer: First I’d make sure name resolution works both ways, usually with conditional forwarders, and that time is in sync, and I’d check the needed ports are open between the DCs in both forests. The forest functional level has to be 2003 or higher, and I’d need admin credentials on both sides or a shared trust password agreed with the other team.

6. How would you explain SID filtering to a new team member?

Why they ask this: They want to know you understand how a trust can be abused and what Windows does to stop it.

How you might answer: I’d tell them that when a user crosses a trust, their ticket carries SIDs for the groups they belong to, and SID filtering strips out any SIDs that belong to other forests or domains. That stops an admin in the trusted forest from slipping in the SID of one of our privileged groups and getting admin rights on our side.

Senior level

7. Two companies are merging, and people need access to each other’s resources next week. How would you handle access while planning the real migration?

Why they ask this: They want to see you work in phases and keep security in mind while the business is pushing for speed.

How you might answer: For the short term I’d set up a forest trust with selective authentication and DNS forwarders both ways, and share resources only with specific groups rather than everyone in the other forest. Meanwhile I’d plan the real account and resource migration, with a tool like ADMT or by moving to a new forest, and once that’s done I’d remove the trust.

8. Users from a trusted forest get access denied on one server, but other servers work fine. How would you troubleshoot it?

Why they ask this: They’re looking for a structured approach that starts with what’s different about that one server.

How you might answer: Since only one server is failing, I’d start with the selective authentication rights on that computer object, then look at the user’s group memberships from the other forest and the NTFS and share permissions. I’d also test DNS from that server to the partner DCs, and on the DCs I’d check security events like 4769 and 4771 to see where authentication breaks.

9. When would you choose an external trust instead of a forest trust?

Why they ask this: They want to know you understand the trade-offs and won’t pick an external trust only because it looks simpler.

How you might answer: I’d use an external trust when only one domain needs to trust one specific domain, often an older or non-root one. It’s non-transitive, so it doesn’t extend to other domains. Most of the time a forest trust is the better choice, so I’d pick an external trust only when that narrow one-domain link is what’s needed.

Quick quiz

Q1. If saatlab.internal trusts partner.internal, who can access what?

  1. saatlab users in partner
  2. partner users in saatlab
  3. Nobody
Show answer

B — Access flows against the trust direction.

Q2. What made trust verification fail in Break It step 1?

  1. A wrong password
  2. PDC1 couldn’t resolve saatlab.internal
  3. SID filtering
Show answer

B — Conditional forwarders are needed both ways.

Q3. What message shows a selective authentication block?

  1. Access is denied
  2. The computer is protected by an authentication firewall
  3. Network path not found
Show answer

B — Grant Allowed to authenticate.

Q4. What does SID filtering protect against?

  1. Slow logons
  2. Foreign SIDs being injected into your groups
  3. DNS failures
Show answer

B — Keep it on for forest trusts.

Q5. In the work story, why could acquired users read many shares?

  1. A virus
  2. Forest-wide authentication plus Authenticated Users permissions
  3. Weak passwords
Show answer

B — Start with selective authentication.

Quick recap

  • Active Directory trusts let users from one forest or domain access resources in another.
  • Access flows the opposite way to the trust direction, and forest trusts are transitive across the domains of both forests.
  • Both sides need DNS (conditional forwarders), synced time and the right ports open.
  • Turn on selective authentication and grant “Allowed to authenticate” only where it’s needed.
  • Keep SID filtering on.
  • “Domain does not exist” points you at DNS, and “authentication firewall” points you at selective authentication.

Next lesson

Lesson 34: Active Directory Certificate Services → Next you’ll install an enterprise CA, publish a web server template, let Group Policy enrol certificates automatically, swap out the self-signed intranet certificate and sort out revocation errors.

Further reading: Active Directory trusts

Want to go deeper into Active Directory trusts? Microsoft’s netdom trust reference covers creating, verifying and changing trusts, and the How Domain and Forest Trusts Work paper still explains the design best. You can also see the full plan for this course on the Windows Server Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.