New user wizard - problem with UserName in format "domain\user"

I was trying to add new user.

I was expecting new user will be added correctly.

Instead I’ve got wrong username in OrigamUser table.

When the user is domain based and the username is in the format “domain\username” the part “domain\” is not inserted into OrigamUser table. It is correctly inserted only in BusinessPartner table. You have to edit database manually to correct this issue.
Origam version 2025.5.2.3862.

This user is then going to sign in via domain or via standard login form?

Mostly via domain when user is connected to LAN - SSO button is visible on login screen.

When using SSO button, OrigamUser is not used and the user can be created simply by adding user on the Users screen (thus without OrigamUser).

The reason why the domain part is stripped, needs to be investigated.

Somehow OrigamUser is probably used during SSO, because when we updated the UserName in OrigamUser table, it started to work.
Here is the error from the log (domain name and username was changed):

2025-09-03 13:49:02,587 [66] ERROR Origam.Security.AbstractProfileProvider - Uživatel DOMAIN\USER nemá přístup do systému.
Origam.Security.ProfileNotFoundException: Uživatel DOMAIN\USER nemá přístup do systému.
   at Origam.Security.OrigamProfileProvider.GetProfile(String userName) in D:\a\1\s\backend\Origam.Security\OrigamProfileProvider.cs:line 82
2025-09-03 13:49:02,911 [66] ERROR Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware - An unhandled exception has occurred while executing the request.
System.AggregateException: One or more errors occurred. (Uživatel DOMAIN\USER nemá přístup do systému.)
 ---> Origam.Security.ProfileNotFoundException: Uživatel DOMAIN\USER nemá přístup do systému.
   at Origam.Security.OrigamProfileProvider.GetProfile(String userName) in D:\a\1\s\backend\Origam.Security\OrigamProfileProvider.cs:line 82
   at Origam.DA.Service.AbstractSqlDataService.LoadDataSet(DataStructureQuery query, IPrincipal principal, DataSet dataset, String transactionId)
   at Origam.Workflow.DataServiceAgent.LoadData(DataStructureQuery query, DataSet data) in D:\a\1\s\backend\Origam.Workflow\Service Agents\DataServiceAgent.cs:line 85
   at Origam.Workflow.DataServiceAgent.Run() in D:\a\1\s\backend\Origam.Workflow\Service Agents\DataServiceAgent.cs:line 421
   at Origam.Workbench.Services.CoreServices.DataService.LoadData(Guid dataStructureId, Guid methodId, Guid defaultSetId, Guid sortSetId, String transactionId, QueryParameterCollection parameters, DataSet currentData, String entity, String columnName) in D:\a\1\s\backend\Origam.Workbench.Services\CoreServices\DataService.cs:line 92
   at Origam.Server.UserStore.GetOrigamUserDataSet(Guid methodId, String paramName, Object paramValue, String transactionId) in D:\a\1\s\backend\Origam.Server\Authorization\UserStore.cs:line 316
   at Origam.Server.UserStore.FindOrigamUserRowByUserName(String normalizedUserName, String transactionId) in D:\a\1\s\backend\Origam.Server\Authorization\UserStore.cs:line 273
   at Origam.Server.UserStore.FindByNameAsync(String normalizedUserName, String transactionId, CancellationToken cancellationToken) in D:\a\1\s\backend\Origam.Server\Authorization\UserStore.cs:line 113
   at Origam.Server.UserStore.FindByNameAsync(String normalizedUserName, CancellationToken cancellationToken) in D:\a\1\s\backend\Origam.Server\Authorization\UserStore.cs:line 109
   at Microsoft.AspNetCore.Identity.UserManager`1.FindByNameAsync(String userName)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Origam.Server.IdentityServerGui.Account.ExternalController.FindUserFromExternalProvider(AuthenticateResult result) in D:\a\1\s\backend\Origam.Server\IdentityServerGui\Account\ExternalController.cs:line 221
   at Origam.Server.IdentityServerGui.Account.ExternalController.Callback() in D:\a\1\s\backend\Origam.Server\IdentityServerGui\Account\ExternalController.cs:line 142
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Origam.Server.Middleware.FatalErrorMiddleware.Invoke(HttpContext context) in D:\a\1\s\backend\Origam.Server\Middleware\FatalErrorMiddleware.cs:line 43
   at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
   at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

I see. Thanks for clarification and testing. OrigamUser is indeed needed. We will investigate the reason for stripping the domain part.