Add AD User Error in Orchestrator

Hello,

I have a little problem with my AD users in Orchestrator. I can add and manage all AD users to the Orchestrator, except one user, and that then also my AD user. I get the following error message there:

DOMAIN\ad|S-1-5-21-713751535-2062382795-2222305133-2505@DOMAIN does not exist. (#1002)

The user excites and I can also easily find in AD. Any idea or even a solution?

Hi @jabroeke

Welcome to UiPath Forum.

Hope the below links will help you.

Thank you.

Hello @Jobin_Joy,

thank you very much for the quick reply. I have already looked through the documentation, but unfortunately still not found the error. I work all day with the AD user, only add unfortunately does not work.

I would suggest looking at your Orchestrators Event Logs in the Event Viewer to see if it reveals a more helpful error message and go from there.

More details can be found here

You can also review your SQL Server database to see if User records are being created appropriately in part, or if a field value is not quite right when comparing to the other user records.

What version of Orchestrator are you using?

Hi @codemonkee

thanks for the hint. Unfortunately, I can not figure out from the logs. Here are the logs:

2021-12-09 08:29:00.2050 UiPath.IdentityServer.Application.Directory.DirectoryService Unexpected error when saving directory entity ad|S-1-5-21-713751535-2062382795-2222305133-2505@kamu in partition 2
InvalidOperationExceptionSequence contains more than one element. at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken)
at UiPath.IdentityServer.MultiTenant.Identity.MultiTenantUserStore.FindByDirectoryIdAsync(String directoryId, Int32 partitionId, CancellationToken cancellationToken)
at UiPath.IdentityServer.MultiTenant.Identity.MultiTenantUserManager.FindByDirectoryIdAndPartitionAsync(String directoryId, Int32 partitionId)
at UiPath.IdentityServer.Web.Application.Services.UserService.CreateOrUpdateDirectoryEntityAsync(Int32 partitionId, DirectoryEntity directoryEntity)
at UiPath.IdentityServer.Application.Directory.DirectoryService.SaveDirectoryEntityAsync(Int32 partitionId, DirectoryEntity directoryEntity)

{“statusCode”:404,“statusDescription”:“NotFound”,“message”:“The entity was not found.”}

UiPath.Orchestrator.Core.Exceptions.NotFoundException: Error code - 1002, Message - ‘kamu\ad|S-1-5-21-713751535-2062382795-2222305133-2505@kamu does not exist.’
at async Task UiPath.Orchestrator.Core.DirectoryService.DirectoryExtensions.GetUserAsync(IDirectoryClient client, UserType userType, DirectoryIdentifier directoryIdentifier)
at async Task UiPath.Orchestrator.Core.DirectoryService.DirectoryExtensions.GetObjectAsync(IDirectoryClient client, UserType userType, DirectoryIdentifier directoryIdentifier)
at async Task UiPath.Orchestrator.Application.Users.UserService.DecorateDirectoryUserAsync(UserDto input, UserCreateContext context)
at async Task UiPath.Orchestrator.Application.Users.UserService.CreateDirectoryUserAsync(UserDto input, UserCreateContext context, string tenantKey)
at async Task UiPath.Orchestrator.Application.Users.UserService.CreateAsync(UserDto input, UserCreateContext context)
at async Task Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at async Task Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at async Task Abp.Runtime.Validation.Interception.ValidationInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at async Task UiPath.Orchestrator.Application.Provisioning.ModernProvisioner.CreateUserAsync(UserDto userDto, UserCreateContext userCreateContext)
at async Task UiPath.Orchestrator.Application.Provisioning.DirectoryProvisioner.CreateUserAsync(UserDto userDto, UserCreateContext userCreateContext)
at async Task UiPath.Orchestrator.Web.Api.OData.Controllers.UsersController.Post(UserDto userDto)
at async ValueTask Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object arguments)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()+Logged(?)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()+Awaited(?)
at void Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()+Awaited(?)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextExceptionFilterAsync()+Awaited(?)
at void Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()+Awaited(?)
at void Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()+Awaited(?)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeAsync()+Logged(?)
at async Task Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at async Task Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at async Task UiPath.Orchestrator.Startup.Swagger.UiSwaggerMiddleware.InvokeAsync(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at async Task UiPath.Orchestrator.Web.Middleware.HeadToGetMethodTransformMiddleware.InvokeAsync(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at void UiPath.Orchestrator.Security.Auth.GenericAccessTokenMiddleware+<>c__DisplayClass0_0+<b__2>d.MoveNext()
at async Task Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at async Task Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at async Task NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context)
at async Task UiPath.Orchestrator.Web.Middleware.ErrorHandlingMiddleware.InvokeAsync(HttpContext context, IErrorService errorService, ILogger logger)