Unable to log in to Orchestrator: Exception during external login callbackSystem.ArgumentNullException: Value cannot be null. (Parameter 'obj')  at int OrdinalIgnoreCaseComparer.GetHashCode(string obj)

How can I fix "Exception during external login callbackSystem.ArgumentNullException: Value cannot be null. (Parameter 'obj') at int OrdinalIgnoreCaseComparer.GetHashCode(string obj)" ?

Issue Description

Unable to log in to Orchestrator with error: "Exception during external login callbackSystem.ArgumentNullException: Value cannot be null. (Parameter 'obj') at int OrdinalIgnoreCaseComparer.GetHashCode(string obj)"

Root Cause

This issue occurred while configuring external authentication (Windows/Azure AD Authentication) in the Orchestrator, which caused a null value to be added to the [UiPath].[identity].[ExternalIdentityProviders] table.

Resolution

Note: Take a backup of the database before running the query.

Delete the null entry in the table by executing the below query:

Delete [UiPathdatabasename].[identity].[ExternalIdentityProviders] where id='2' and AuthenticationScheme='oidc' and DisplayName=’Null’