What does Windows error code 628 (ERROR_SERVER_SID_MISMATCH) mean?

 
Previous Next
ERROR_RANGE_LIST_CONFLICT ERROR_CANT_ENABLE_DENY_ONLY

ERROR_SERVER_SID_MISMATCH

What this result means

ERROR_SERVER_SID_MISMATCH is a Windows system result. The client validated the server identity and found that the process token does not match the expected account or service SID. This protects against connecting to the wrong or impersonating process.

Likely causes

  • the service account was changed without updating access policy
  • a similarly named service or endpoint is owned by another principal
  • service SID configuration, token isolation, or launch permissions are incorrect
  • an attacker or accidental process claimed the expected communication endpoint

How to diagnose it

Record the expected and actual SIDs, service name, process ID, executable path and signature, token groups, endpoint identity, and service configuration. Avoid logging unrelated token data or secrets.

Correct handling

Reject the connection. Correct the service account or SID policy and verify executable ownership before restarting. Never relax identity checks merely to make the connection succeed.

Where this code is usually encountered

  • Security metadata belongs to a different server identity than the one processing it.
  • A server is cloned, restored, or renamed without preserving the identity assumptions of a protected operation.
  • Cached credentials or replication data refer to a previous SID.

Evidence worth collecting

  • expected and observed server/domain SIDs
  • machine account and secure-channel status
  • restore, clone, rename, and domain-join history
  • the object or protocol carrying the stale identity

Practical diagnostic sequence

  1. Identify which side supplied each SID instead of assuming the local machine is wrong.
  2. Verify the computer account and secure channel with supported domain tools.
  3. Clear or regenerate only the cache owned by the affected product after identity is corrected.
  4. For restored servers, follow the product’s identity-preserving or re-registration procedure.

Guidance for developers

Do not persist a server SID as the sole durable identity across clone and restore unless the product contract requires it. Error logs should include identity source and scope without exposing secrets.

Guidance for administrators

Avoid manual SID editing. Rejoin, re-register, or restore according to the server role and application documentation.

How to interpret it correctly

A SID mismatch is stronger evidence than generic authentication failure: both identities may be valid individually but refer to different security principals.

Example failure pattern

A common recovery or clone scenario preserves application data tied to the old machine SID while the restored server joins the domain as a new principal. Authentication may succeed for users, yet application-level secure metadata still rejects the server identity.

Retry and recovery policy

Retry only after secure-channel and product identity have been reconciled. Repeated authentication attempts with the same mismatched principals can trigger lockout or security alerts without changing the result.

Suggested telemetry

For ERROR_SERVER_SID_MISMATCH, record the operation name, component version, process and thread identity, the original numeric result, the immediately preceding state transition, and a correlation identifier. Keep the ERROR_SERVER_SID_MISMATCH event separate from later fallback failures so its first actionable cause remains searchable across machines.

References


Looking for a different code? Search another status or error code.