Target Principal Name Is Incorrect - Cannot Generate SSPI Context

How to handle the when the target principal name is incorrect and SSPI context can not be generated ?

The below steps can be followed to correct the Target Principal Name:

  1. Go to Run type inetmgr and Click OK

  1. Click on the Application Pool and select the UiPath Orchestrator Application Pool and right-click on the Application Pool select Advance Settings

  1. Select the application pool and update the service account password

  1. Once updated the password, run command prompt as Administrator and run iisreset command

  1. Hit the URL of the Orchestrator .

I have attempted the above listed solution but I’m still getting the same error. I’ve tried several different accounts as well with no success.

[SqlException (0x80131904): The target principal name is incorrect. Cannot generate SSPI context.]
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1341
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +159 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +382
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) +307 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) +198
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) +422 System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken) +611 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.SqlServer.<<ExecuteAsync>b__3>d__6.MoveNext() +291 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.SqlServer.<ExecuteAsyncImplementation>d__91.MoveNext() +493
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Data.Entity.Core.EntityClient.d__8.MoveNext() +926

[EntityException: The underlying provider failed on Open.]
System.Data.Entity.Core.EntityClient.d__8.MoveNext() +1239
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Data.Entity.Core.Objects.d__9.MoveNext() +508
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Data.Entity.Core.Objects.d__3d1.MoveNext() +308 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.SqlServer.<ExecuteAsyncImplementation>d__91.MoveNext() +561
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Data.Entity.Utilities.CultureAwaiter1.GetResult() +43 System.Data.Entity.Core.Objects.<GetResultsAsync>d__e.MoveNext() +728 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.Utilities.CultureAwaiter1.GetResult() +43
System.Data.Entity.Internal.d__0.MoveNext() +331
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Data.Entity.Infrastructure.d__51.MoveNext() +379 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Abp.EntityFramework.Repositories.<GetAllListAsync>d__17.MoveNext() +352 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Abp.Threading.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() +668
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Abp.Configuration.d__3.MoveNext() +906
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Abp.Threading.d__51.MoveNext() +668 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Abp.Configuration.<<GetApplicationSettingsAsync>b__38_0>d.MoveNext() +313 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Abp.Runtime.Caching.<<GetAsync>b__0>d.MoveNext() +255 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Abp.Runtime.Caching.<GetAsync>d__20.MoveNext() +1018 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Abp.Runtime.Caching.<GetAsync>d__92.MoveNext() +408
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Abp.Configuration.d__38.MoveNext() +274
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Abp.Configuration.d__35.MoveNext() +244
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Abp.Configuration.d__33.MoveNext() +1106
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task1 task) +46 System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() +104
System.Threading.Tasks.Task.Execute() +71
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task1 task) +46 Nito.AsyncEx.AsyncContext.Run(Func1 action) +389
Abp.Configuration.SettingManagerExtensions.GetSettingValue(ISettingManager settingManager, String name) +117
UiPath.Orchestrator.Core.Settings.UiSettingManager.GetSettingValue(String name, Nullable1 tenantId) +205 Castle.Proxies.Invocations.IUiSettingManager_GetSettingValue.InvokeMethodOnTarget() +178 Castle.DynamicProxy.AbstractInvocation.Proceed() +106 Castle.DynamicProxy.AbstractInvocation.Proceed() +449 Castle.Proxies.IUiSettingManagerProxy.GetSettingValue(String name, Nullable1 tenantId) +209
UiPath.Orchestrator.Web.ApplicationInsights.UiPathApplicationInsightsModule.CreateTelemetryInitializer() +245
UiPath.Orchestrator.Web.ApplicationInsights.UiPathApplicationInsightsModule.PostInitialize() +45
UiPath.Orchestrator.Web.ApplicationInsights.Modules.InstrumentedAbpModuleManager.Measure(IEnumerable1 modules, Action1 action, String operation, String type) +151
UiPath.Orchestrator.Web.ApplicationInsights.Modules.InstrumentedAbpModuleManager.StartModules() +538
Abp.AbpBootstrapper.Initialize() +440
UiPath.Orchestrator.Web.OrchestratorWebApplication.Application_Start(Object sender, EventArgs e) +722

[HttpException (0x80004005): The underlying provider failed on Open.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +517
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo handlers) +185
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo handlers, IntPtr appContext, HttpContext context) +168
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369

[HttpException (0x80004005): The underlying provider failed on Open.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724