Seeing Error (#1000) Frequently while Assigning Role to AD User in Orchestrator

Error (#1000) frequently appears while assigning role to AD user in Orchestrator.

Issue Description

This article describes what to do when you see error (#1000) frequently while assigning a role to AD user in Orchestrator.

Troubleshooting Steps

  1. Restarting IIS or Orchestrator can resolve the issue temporarily, but the error will reoccur in a couple of hours.
  2. "DomainUnreachable" error can be seen in Event Viewer log as follows:
    • 2023-06-14 02:35:22.5078 UiPath.IdentityServer.Directory.Abstractions.Interfaces.IDirectoryAdapterConfiguration Error retrieving AD security groups for S-1-5-21-1708537768-1303643608-725345543-13609862. PrincipalOperationException*Creating an instance of the COM component with CLSID {080D0D78-F421-11D0-A36E-00C04FB950DC} from the IClassFactory failed due to the following error: 800401e4 Invalid syntax (0x800401E4 (MK_E_SYNTAX)).* at System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemberOfAZ(Principal p) at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroupsHelper() at UiPath.IdentityServer.Directory.Active.ActiveDirectoryClient.GetGroupsByUserPrincipalInternal(String domain, UserPrincipal principal) at UiPath.IdentityServer.Directory.Active.ActiveDirectoryClient.GetGroupsByUserPrincipal(String domain, Func`1 principalFunc, CancellationToken token) at UiPath.IdentityServer.Directory.Active.ActiveDirectoryClient.GetUserGroupsAsync(DirectoryIdentifier directoryIdentifier, IEnumerable`1 groupIdentifiers, CancellationToken token)
	COMException*Creating an instance of the COM component with CLSID {080D0D78-F421-11D0-A36E-00C04FB950DC} from the IClassFactory failed due to the following error: 800401e4 Invalid syntax (0x800401E4 (MK_E_SYNTAX)).* at System.DirectoryServices.AccountManagement.ADStoreCtx.LoadDomainInfo() at System.DirectoryServices.AccountManagement.ADStoreCtx.get_DnsDomainName() at System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemberOfAZ(Principal p)
    • 2023-06-14 02:32:33.4694 UiPath.IdentityServer.Web.Middleware.ExceptionHandlingMiddleware DomainUnreachable DirectoryAdapterException*DomainUnreachable* UiPath.IdentityServer.Directory.Active.ActiveDirectoryAdapter.GetScopesAsync(CancellationToken token) ...
    • 2023-06-14 02:32:33.4651 UiPath.IdentityServer.Directory.Abstractions.Interfaces.IDirectoryAdapterConfiguration The configured domain 'xxx.xxx' is not accessible. COMException*Creating an instance of the COM component with CLSID {080D0D78-F421-11D0-A36E-00C04FB950DC} from the IClassFactory failed due to the following error: 800401e4 Invalid syntax (0x800401E4 (MK_E_SYNTAX)).* at System.DirectoryServices.ActiveDirectory.DirectoryEntryManager..ctor(DirectoryContext context) at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context) at UiPath.IdentityServer.Directory.Active.ActiveDirectoryClient.GetConfiguredDomain(String DomainName, IDomainResolver domainResolver)
  3. All application pools are configured as customized AD account.
  4. Domain status is normal by checking with commands "dsregcmd /status' and 'nltest /dsgetdc:{Domain}".
  5. Open IIS, navigate to "Application Pool" > "UiPath Orchestrator" > "Advanced Settings", and set "Load User Profile" option to "True", and restart IIS.

Resolution Steps

  1. Open IIS.
  2. Navigate to 'Application Pool' > 'UiPath Orchestrator' > 'Advanced Settings'.
  3. Set 'Load User Profile' option to 'True'.
  4. Open an elevated CMD window, and run IISRESET to restart IIS.