The target principal name is incorrect - KB

What Orchestrator configuration changes are required when a certificate is used for the SQL Server connection?

Issue Descruption:

  • System.Exception: Error:-1, Message: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.) at UiPath.OrchestratorCAs.IdentityDatabaseManager.RunDbMigrationToolObfuscatedLogging(String arguments, String[] tokensToObfuscate)

Cause:

  • The error suggests an SSL handshake issue while logging in to the SQL server with the given connection string.

Resolution:

  • Ensure that the SQL connection string has the server fully-qualified domain name (FQDN) rather than the relative domain or hostname in all Locations Of The Database Connection Strings.
  • Add the parameter TrustServerCertificate=True in the connection string.
  • For example: <add name="UiPath" providerName="Microsoft.Data.SqlClient" connectionString="Data Source=your.domain.net,6789;Initial Catalog=RPADB;TrustServerCertificate=True;User ID=user;Password=password" />
1 Like