Domain user authentication fails on Windows: Error codes 1787, 1789

Problem


Launching a Lycia Desktop/Web app through the secure instance fails on Windows.

Domain user credentials are correct and can be successfully used for system login. Web Server log contains one of the following error codes:

ERROR: Change user failed :error 1787

ERROR_NO_TRUST_SAM_ACCOUNT
1787 (0x6FB)
The security database on the server does not have a computer account for this workstation trust relationship.


LogonUser() Failed with error code: 1789

ERROR_TRUSTED_RELATIONSHIP_FAILURE
1789 (0x6FD)
The trust relationship between this workstation and the primary domain failed.


Solution


This issue typically occurs when the computer on which you're running the Lycia app can't authenticate with Active Directory. To resolve this issue, use one or more of the following methods:

Click Start, right-click Computer, and then click Properties. Under Computer name, domain, and workgroup settings, click Change Settings.

  1. Click the Computer Name tab, and then click Change.
  2. Select the Workgroup option, and then type a workgroup in the Workgroup dialog box.
  3. Restart the computer.
  4. Repeat steps 1 through 3.
  5. Select the Domain option, and then type the domain name in the Domain dialog box to add the computer back to the domain.
  6. Restart the computer.