trust relationship failed Windows Origin: Platform & cloud OSI layer 7 · Application Last updated 13 Oct 2026

The trust relationship between this workstation and the primary domain failed

The computer’s machine account password no longer matches Active Directory, so domain logins fail.

Exact message you may see The trust relationship between this workstation and the primary domain failedtrust relationship failedThe security database on the server does not have a computer account for this workstation trust relationship
Seen on: Windows

Meaning

Restoring a VM snapshot/old image, a duplicate computer name, or the PC being offline for a very long time makes the secure channel break. Rejoining or resetting the secure channel fixes it.

Common causes

  • VM restored from an old snapshot
  • Computer account reset or deleted in AD
  • Duplicate computer name / cloned image without sysprep
  • Very long time offline

⚡ Quick fix

  1. Log in with a local admin and reset the secure channel
  2. Or rejoin the domain
  3. Avoid restoring old snapshots of domain members

Detailed fix by platform

PowerShell

  1. powershell
    Test-ComputerSecureChannel -Repair -Credential (Get-Credential DOMAIN\admin)
    # or
    Reset-ComputerMachinePassword -Credential (Get-Credential DOMAIN\admin)

How to diagnose

  1. AD — Computer object exists/enabled?
  2. Snapshot — Restored recently?
  3. Name — Duplicates?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

0x80004005 — Windows Error 0x80004005 (E_FAIL): Unspecified error (Windows)0x800040050x80070002 — Windows Error 0x80070002: The system cannot find the file specified (Windows)0x800700020x80070005 — Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied (Windows)0x800700050x8007000D — Windows error 0x8007000D (The data is invalid) (Windows)0x8007000D0x80070020 — 0x80070020: The process cannot access the file because it is being used by another process (Windows)0x800700200x80070057 — Windows error 0x80070057 (The parameter is incorrect) (Windows)0x80070057553 5.1.8 — 553 5.1.8 Domain of sender address <x> does not exist (sendmail/Exim sender verification) (Email / SMTP)553 5.1.8App Service — Azure App Service: custom domain SSL binding failed (certificate not found, thumbprint or hostname validation) (SSL / TLS)App Servicetrust rel…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.