Share via

SQL “untrusted domain” error over VPN for one device only (Windows Auth)

Lee Barnes 0 Reputation points
2026-04-21T15:43:08.6733333+00:00

I’m looking for some advice on an issue affecting a single user/device when connecting to SQL Server over VPN.

The user receives the following error when launching an application that connects to SQL Server using Windows Authentication:

“Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.”

They are also prompted for credentials for the SQL server.


What has been tested

  • Device is domain joined and trust is healthy
  • VPN connection is established and stable
  • Server is reachable (ports open, name resolution working)
  • Credentials cleared and re-entered
  • Device removed and rejoined to the domain
  • Kerberos tickets reset and re-tested

Current behaviour

  • Application launches
  • Prompts for credentials
  • Correct domain credentials are entered
  • Authentication fails with “untrusted domain” error
  • If administrative domain credentials are entered, the application connects successfully

Notes

  • Appears to be related to how authentication is handled over VPN on this specific device
  • No issues observed on other machines in similar conditions

Question

What could cause Windows Authentication to fail with an “untrusted domain” error on only one domain-joined device over VPN, while working elsewhere?

Are there any additional client-side checks or configurations that should be reviewed?I’m looking for some advice on an issue affecting a single user/device when connecting to SQL Server over VPN.

The user receives the following error when launching an application that connects to SQL Server using Windows Authentication:

“Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.”

They are also prompted for credentials for the SQL server.


What has been tested

  • Device is domain joined and trust is healthy
  • VPN connection is established and stable
  • Server is reachable (ports open, name resolution working)
  • Credentials cleared and re-entered
  • Device removed and rejoined to the domain
  • Kerberos tickets reset and re-tested

Current behaviour

  • Application launches
  • Prompts for credentials
  • Correct domain credentials are entered
  • Authentication fails with “untrusted domain” error
  • If administrative domain credentials are entered, the application connects successfully

Notes

  • Appears to be related to how authentication is handled over VPN on this specific device
  • No issues observed on other machines in similar conditions

Question

What could cause Windows Authentication to fail with an “untrusted domain” error on only one domain-joined device over VPN, while working elsewhere?

Are there any additional client-side checks or configurations that should be reviewed?

that should be reviewed?

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


2 answers

Sort by: Most helpful
  1. Carl Walker 0 Reputation points
    2026-04-22T07:45:16.9466667+00:00

    This isn’t a SQL Server or actual “domain trust” problem it's an authentication breakdown on that specific client. The error means the client failed to present valid Windows credentials that SQL Server could validate, which usually happens when Kerberos can’t be established and NTLM fallback also fails. Since other machines work, focus on that device: it’s likely not getting a valid Kerberos ticket over VPN or can’t reach a domain controller. Check DNS first (it must resolve to internal DCs when on VPN), then verify Kerberos with klist (look for/refresh tickets using klist purge), and confirm the machine can contact a DC (nltest /dsgetdc:<domain>). Also check time sync (Kerberos is sensitive to clock drift) and whether the SQL Server SPN is correctly registered. If Kerberos fails, SQL falls back to NTLM—but if NTLM is restricted or broken, you’ll get this exact error. So in short: this device is failing the Kerberos/NTLM handshake, most likely due to DNS, ticketing, or domain connectivity over VPN.

    Was this answer helpful?


  2. AI answer

    2026-04-21T15:43:37.5066667+00:00

    The error indicates a Windows authentication problem between the client and SQL Server, not a generic connectivity issue. From the context, there are three main categories to focus on for a single-device, VPN-only scenario:

    1. Local Security Subsystem (LSASS) / domain trust behavior on that device
    2. Kerberos / SPN resolution over VPN
    3. How the user account is resolved and authorized in SQL Server

    Because admin domain credentials work but the user’s do not, the issue is likely with how the user’s Windows identity is being resolved or authenticated from that specific machine, not with SQL Server itself.

    1. Check for LSASS / local security subsystem issues

    The error text “The login is from an untrusted domain and cannot be used with Windows authentication” can be raised when the Local Security Authority Subsystem Service (LSASS) is unresponsive or cannot contact a domain controller:

    • On the SQL Server, check the error log for entries like:
      • SSPI handshake failed with error code 0x80090311 or 0x80090304
      • Windows error codes:
        • 0x80090311: No authority could be contacted for authentication.
        • 0x80090304: The Local Security Authority cannot be contacted.

    If these appear around the time this user connects, the problem is in the security subsystem path between the client and the DC.

    Client-side checks:

    • Confirm the VPN allows domain controller traffic (Kerberos/LDAP) from this device’s subnet.
    • Compare this device’s network and VPN profile to a working device (same DNS servers, same domain suffix, same routing to DCs).
    • If LSASS is stuck or misbehaving on the client, a reboot is required; if multiple users see similar issues after OS updates, restarting domain controllers has been shown to clear LSASS-related authentication issues.

    Relevant guidance: Local security subsystem errors in SQL Server

    2. Kerberos / SPN and name resolution

    Kerberos problems can cause Windows authentication to fail and fall back to NTLM or fail outright. For this user’s device over VPN:

    • Verify the application’s connection string uses the correct server name (prefer FQDN, not just NetBIOS). An incorrect DNS suffix or name can cause Kerberos to fail and lead to authentication errors.
    • Ensure the Service Principal Name (SPN) for SQL Server is correctly registered and reachable from the VPN network. Use setspn -Q from an admin machine to validate SPNs for the SQL Server service account.
    • If the SQL Server error log shows Cannot generate SSPI context for this client, follow the SPN troubleshooting guidance in the “consistent authentication issues” article.

    Relevant guidance:

    3. Domain / group resolution and SQL Server login mapping

    The same error text also appears when SQL Server cannot resolve or authorize the Windows principal:

    • If the login is from an untrusted domain or a cross-domain group cannot be resolved, SQL Server treats the principal as unrecognized.
    • For cross-domain scenarios, users from a remote domain must belong to a group in the SQL Server domain; otherwise group membership cannot be enumerated.

    Checks:

    • On SQL Server, verify the user’s domain account or group appears under Security → Logins in SSMS and is not disabled.
    • If access is via groups, run xp_logininfo 'DOMAIN\User' on SQL Server to confirm SQL Server can resolve the user and group membership. If this fails for the user but not for admin accounts, there may be group or trust resolution issues.
    • Compare the user’s group memberships with a working user; if the user relies on a cross-domain group, confirm the group is in the SQL Server domain and that domain trust is configured correctly.

    Relevant guidance:

    4. Client-side items specific to this device

    Given that other machines work over VPN, focus on differences on this device:

    1. DNS and suffix search list
      • Ensure the device uses the same DNS servers and domain suffix as working devices so that the SQL Server FQDN and DCs resolve correctly.
    2. Time synchronization
      • Kerberos requires time to be in sync. Confirm the device time is within the allowed skew of the domain controllers.
    3. Credential handling
      • Clear any stored credentials for the SQL Server in Credential Manager and retry.
    4. Security policies / Credential Guard
      • If Credential Guard or other security hardening is enabled only on this device, it can interfere with integrated authentication. The “Credential guard is enabled” scenario is listed as a potential cause of consistent authentication issues.
    5. OS / update anomalies
      • If this device is on a different OS build or has recently received security updates affecting authentication, compare with a working device. In some environments, restarting domain controllers resolved widespread post-update authentication issues.

    5. SQL Server error details

    Finally, use the SQL Server error log to narrow down the cause:

    • Look for Error 18456 entries corresponding to this user and note the state value. The state gives specific reasons for login failure; use the mapping in the MSSQLSERVER_18456 documentation to guide further troubleshooting.

    Relevant guidance: MSSQLSERVER_18456


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.