The Certificate Chain was Issued by an Authority that is not Trusted

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (Microsoft SQL Server)

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 – The certificate chain was issued by an authority that is not trusted.) (Microsoft SQL Server). The certificate chain was issued by an authority that is not trusted.

Cause

SQL Server Management Studio can establish the connection to SQL Server. However, the server certificate is not trusted. It indicates that the client computer is unable to verify the authenticity of the SQL Server certificate because it was issued by a certificate authority (CA) that is not trusted by the client. This can happen for a variety of reasons, such as if the CA is not installed on the client computer, or if the CA’s certificate has been revoked.

Solution

Follow the simple steps below to solve the issue.

  1. Open SQL Server Management Studio (SSMS) and Click Connect Database Engine.
  2. Enter the SQL Server instance name and provide the SQL server authentication username and password.
  3. Click on the ‘Options <<‘ button and check the Trust server certificate checkbox, as shown in the below image.
  4. Click Connect, and your connection should now work.
the certificate chain was issued by an authority that is not trusted

If you are facing this issue in an SQL server connection using a connection string, add ‘TrustServerCertificate=True’ as a parameter to your connection string.

Data Source=<sql server instance name>; 
Initial Catalog=<database name>; 
Integrated Security=True; 
Encrypt=True; 
TrustServerCertificate=True; 

Pro tips:
1. When TrustServerCertificate = true, the transport layer will use TLS to encrypt the channel and bypass walking the certificate chain to validate trust.
2. In brief, the “The Certificate Chain was Issued by an Authority that is not Trusted” error arises because SQL Server employs a self-signed certificate as its default. 

See more

Kunal Rathi

With over 13 years of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.

Shopping Cart
Scroll to Top