Fix it now
Microsoft publishes 1788 as “The trust relationship between the primary domain and the trusted domain failed”. This is a trust between two domains, not one machine’s secure channel. Verify the trust first, and reset the shared secret only if verification fails.
netdom trust corp.example.com /Domain:partner.example.net /Verify /UserD:partner\admin /PasswordD:* /UserO:corp\admin /PasswordO:*
nltest /sc_query:partner.example.net
- Microsoft describes
/Verifyas verifying the secure channel secrets for a specific trust relationship. If it succeeds, the secret is intact and the fault is elsewhere. - If verification fails, reset the secret with the same command and
/Resetin place of/Verify. Microsoft describes/Resetas resetting the trust secret between trusted domains. - On a two-way trust, do both directions and confirm each one separately.
- If verification fails with a domain-not-found error, stop resetting and fix name resolution between the two forests first.
Both sides need credentials. /UserD and /PasswordD are for the trusted domain, /UserO and /PasswordO for the trusting one, and /SecurePasswordPrompt opens a secure credential prompt where a password would otherwise be typed.
If verification now succeeds in both directions and a cross-domain sign-in works, you are done. If not, the next section covers what a trust is made of and which part has failed.
Why it happens
A trust is a pair of objects, one in each domain, plus a shared secret the two sides rotate. If one side is restored or rebuilt, its copy stops matching, and every authentication crossing the trust fails from that moment. That is what netdom trust /Verify is testing when Microsoft describes it as verifying the secure channel secrets for a specific trust relationship, and it is what /Reset puts back.
Authentication over a trust is referral-based. A client asks its own domain controller for a ticket to a service in the other domain, its domain controller issues a referral encrypted with the trust key, and the far domain’s key distribution centre decrypts it and issues the service ticket. The failure surface is therefore four things: the shared key, the ability to find the other side’s domain controllers, the ability to reach them, and the rules deciding which name suffixes route across.
The neighbouring codes divide that space, and one of them is routinely misread. 1790, ERROR_TRUST_FAILURE, is published simply as “The network logon failed”. 1396, ERROR_WRONG_TARGET_NAME, is “The target account name is incorrect”, which points at a service principal name rather than at the trust. 1355 is “The specified domain either does not exist or could not be contacted”, which is name resolution. 1326 is “The user name or password is incorrect”.
1265 is the one to be careful with. Microsoft publishes ERROR_DOWNGRADE_DETECTED as “The system cannot contact a domain controller to service the authentication request. Please try again later.” Older material reads it as a security-compromise warning and infers a key mismatch from it; that is not what Microsoft publishes. Read a 1265 as the system being unable to reach a domain controller for the request, and go and check that it can.
The shared secret has diverged
You have this one if netdom trust /Verify fails immediately, and both sides log 1788 entries.
- Reset it:
netdom trust <trusting> /Domain:<trusted> /Reset, with administrative credentials for both domains supplied through /UserD, /PasswordD, /UserO and /PasswordO. - On a two-way trust, do both directions and verify each separately afterwards.
- Purge cached tickets on a test client before retesting, so you are not reading a ticket issued before the change.
Resetting from one side needs administrative credentials in the other domain. If those are not available, each organisation deletes and recreates its own half instead, together, in a window.
DNS between the two forests does not resolve
You have this one if Verification fails with 1355, and looking up the other domain’s domain controller service records from your side returns nothing.
- Create conditional forwarders in each forest pointing at the other’s DNS servers, or stub zones.
- Test from a domain controller on each side that the other’s
_ldap._tcp.dc._msdcs.<domain>records resolve. - Do not rely on public DNS to resolve either forest’s internal zone.
Name suffix routing is disabled or in conflict
You have this one if A forest trust where users with one user principal name suffix authenticate and users with another do not.
- List the routed suffixes with
netdom trust <trusting> /Domain:<trusted> /NameSuffixes:<trust name>. Microsoft documents this as valid only for forest trusts and forest transitive realm trusts. - Enable or disable one by number with
/ToggleSuffix:#. - If a suffix reports a conflict, resolve the conflict before enabling routing; it usually means both forests claim the same suffix.
The path between the forests is not open
You have this one if Verification fails intermittently or times out rather than being refused, and the two forests sit behind different firewalls.
- Confirm the documented Active Directory port set is open both ways: 53, 88, 135, 389, 445, 464, 3268 and 3269, plus the RPC high ports 49152 to 65535.
- Test from a domain controller on each side rather than from a workstation.
- Run
dcdiag /test:CheckSecurityErroron both sides. Microsoft documents it as checking that a KDC is online and reachable for each domain, that the DC’s computer object has replicated, and that service principal names and account flags are correct.
One side runs at a level the other cannot work with
You have this one if Verification fails however often the secret is reset, and the other side runs domain controllers on releases you have not had to think about for years.
- Establish what each side actually runs and check it against Microsoft’s functional level table: a Windows Server 2025 domain controller supports the Windows Server 2025 and Windows Server 2016 functional levels and does not support Windows Server 2012 R2.
- If the other side cannot reach a level your domain controllers support, that is a project on their side and no command on yours substitutes for it.
- Recreate the trust once both sides are at levels that interoperate.
Full reference
The codes
| Code | Symbolic name | Microsoft’s published text |
|---|---|---|
1788 |
ERROR_TRUSTED_DOMAIN_FAILURE | The trust relationship between the primary domain and the trusted domain failed |
1790 |
ERROR_TRUST_FAILURE | The network logon failed |
1265 |
ERROR_DOWNGRADE_DETECTED | The system cannot contact a domain controller to service the authentication request. Please try again later |
1396 |
ERROR_WRONG_TARGET_NAME | The target account name is incorrect |
1355 |
ERROR_NO_SUCH_DOMAIN | The specified domain either does not exist or could not be contacted |
1326 |
ERROR_LOGON_FAILURE | The user name or password is incorrect |
1265 is not a key mismatch. Microsoft’s published text points at reaching a domain controller, so treat it as a connectivity and locator problem rather than as evidence that the trust secret is wrong.
The netdom trust syntax, in full
| Parameter | What Microsoft says it does |
|---|---|
/Domain:<trusted> |
Names the trusted domain or non-Windows realm. Defaults to the current domain |
/Verify |
Verifies the secure channel secrets for a specific trust relationship |
/Reset |
Resets the trust secret between trusted domains or between the DC and workstation |
/UserD and /PasswordD |
The account used for the connection with the domain named by /Domain |
/UserO and /PasswordO |
The account used for the connection with the trusting domain |
/NameSuffixes:<trust name> |
Lists the routed name suffixes. Valid only for forest trusts or forest transitive realm trusts |
/ToggleSuffix:# |
Used with /NameSuffixes to enable or disable a specific suffix by number |
/SecurePasswordPrompt |
Opens a secure credentials prompt. Effective only where the password is entered as * |
A worked example from Microsoft’s own documentation, verifying with Kerberos and credentials on both sides: netdom trust MyDomain /domain:devgroup.example.com /verify /kerberos /userd:devgroup\admin /passwordd:* /usero:MyDomain\admin /passwordo:*. The one-way reset example is shorter, because only the trusted side’s credentials are needed.
Where the supported line falls
| Domain controller | 2025 functional level | 2016 functional level | 2012 R2 functional level |
|---|---|---|---|
| Windows Server 2025 | Supported | Supported | Not supported |
| Windows Server 2022 | Not supported | Supported | Supported |
| Windows Server 2019 | Not supported | Supported | Supported |
| Windows Server 2016 | Not supported | Supported | Supported |
| Windows Server 2012 R2 | Not supported | Not supported | Supported |
Microsoft also notes that Windows Server 2019 and Windows Server 2022 use Windows Server 2016 as their most recent functional level. Read the table before accepting anyone’s claim about what a partner domain must be running: the constraint that actually exists is which functional levels a given domain controller release supports, and a Windows Server 2025 domain controller will not sit at the Windows Server 2012 R2 level at all.
Before you delete and recreate anything
Deleting and recreating a trust interrupts every cross-domain authentication while it is down, including scheduled jobs and service accounts nobody remembers exist. Plan a window, tell both organisations, and try /Verify and /Reset first – they are what Microsoft documents for a secret that has diverged.
Selective authentication
Where a trust validates cleanly and specific foreign users are still refused at specific servers, look at whether the trust was created with selective authentication. That configuration deliberately requires an explicit grant before a foreign principal may authenticate to a given computer, so the refusals are the design working rather than the trust failing. It produces credential-shaped errors, which is why it gets investigated as a broken trust; the giveaway is that the failure follows particular target servers rather than particular users or times.
Forest trust or external trust
A forest trust connects two whole forests, is transitive across the domains in each, and supports name suffix routing – which is why /NameSuffixes applies only to forest trusts and forest transitive realm trusts. An external trust connects one specific domain to another and nothing else. If your organisation only ever needs one relationship with one domain, the external trust is the smaller surface. If you find yourself creating a second and a third, you probably wanted a forest trust.
When a licence is the actual fix
Most of the time this costs nothing: a verify, a reset, a conditional forwarder or a routing change. It becomes a purchase in one case, and it is worth being precise about it rather than vague. Microsoft’s functional level table sets which levels each domain controller release supports – a Windows Server 2025 domain controller supports the Windows Server 2025 and Windows Server 2016 levels and does not support Windows Server 2012 R2 – so a partner domain that cannot reach a level your domain controllers support has to bring its own servers forward, and no reset on your side substitutes. Where that replacement is on your side of the trust, it needs licensed Windows Server. Microsoft publishes the edition difference plainly: Standard permits two virtual machines plus one Hyper-V host per licence, Datacenter permits unlimited virtual machines plus one Hyper-V host, and how many people may use either is governed by client access licences. Arco will work the count through with you and check what your agreement already covers.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
1788 |
ERROR_TRUSTED_DOMAIN_FAILURE: the trust relationship between the primary domain and the trusted domain failed | Microsoft Learn |
1790 |
ERROR_TRUST_FAILURE: the network logon failed | Microsoft Learn |
1265 |
ERROR_DOWNGRADE_DETECTED: the system cannot contact a domain controller to service the authentication request. Microsoft’s published text points at reaching a DC, not at a mismatched trust key | Microsoft Learn |
1396 |
ERROR_WRONG_TARGET_NAME: the target account name is incorrect | Microsoft Learn |
1355 |
ERROR_NO_SUCH_DOMAIN: the specified domain either does not exist or could not be contacted | Microsoft Learn |
1326 |
ERROR_LOGON_FAILURE: the user name or password is incorrect | Microsoft Learn |
Confirm the fix worked
netdom trust <trusting> /Domain:<trusted> /Verifysucceeds in both directions.nltest /sc_query:<trusted domain>reports success from a domain controller on each side.- A user from the other domain reaches a resource that had been failing.
dcdiag /test:CheckSecurityErrorreports no errors on either side.- No new 1788 entries appear on either side over a full working day.
Questions people ask about this
Will resetting the trust log everybody out?
It does not invalidate existing sessions, but authentication across the trust is interrupted while the secret is reset, and clients holding earlier referral tickets keep failing until those expire. Do it in a window.
Do I need administrative credentials in both domains?
To reset from one side, yes – that is what /UserD and /UserO are for. If the other organisation will not supply them, each side deletes its own half and the two are recreated together.
I have a 1265. Is the trust key wrong?
Not according to what Microsoft publishes. ERROR_DOWNGRADE_DETECTED reads as the system being unable to contact a domain controller to service the authentication request, so check that a domain controller in the target domain is reachable before you touch the secret.
Should this be a forest trust or an external trust?
A forest trust when you want two whole forests to work together, because it is transitive across the domains in each and supports name suffix routing. An external trust when you want a relationship with one specific domain and nothing more.
What does fixing this cost?
Nothing, when the fix is a verify, a reset, a forwarder or a routing change. It becomes a purchase only where a domain controller has to be replaced because it cannot sit at a functional level the other side’s servers support.
