Hi, I have a program which calls LookupAccountName for a AD user in the following format - DomainName\UserName. LookupAccountName fails with the following error 1789 is ERROR_TRUSTED_RELATIONSHIP_FAILURE in the Windows SDK - "The trust relationship between this workstation and the primary domain failed." Now, I run the following from the command line runas /user:domainname\username cmd.exe It successfully opens a cmd window as the user. After this I run my program again, the same LookupAccountName call succeeds. Any ideas, how something like this could happen?