diff --git a/src/Tgstation.Server.Host/Security/WindowsSystemIdentityFactory.cs b/src/Tgstation.Server.Host/Security/WindowsSystemIdentityFactory.cs index 3646d71cd1..774170c4a4 100644 --- a/src/Tgstation.Server.Host/Security/WindowsSystemIdentityFactory.cs +++ b/src/Tgstation.Server.Host/Security/WindowsSystemIdentityFactory.cs @@ -63,11 +63,15 @@ namespace Tgstation.Server.Host.Security PrincipalContext pc = null; UserPrincipal principal = null; + GetUserAndDomainName(user.SystemIdentifier, out _, out var domainName); + bool TryGetPrincipalFromContextType(ContextType contextType) { try { - pc = new PrincipalContext(contextType); + pc = domainName != null + ? new PrincipalContext(contextType, domainName) + : new PrincipalContext(contextType); cancellationToken.ThrowIfCancellationRequested(); principal = UserPrincipal.FindByIdentity(pc, user.SystemIdentifier); }