MS Excel Error: “The certificate chain was issued by an authority that is not trusted”

Copper Contributor

I am getting below error with Excel files which is retreving data from SQL Server.

 

DataSource.Error:Microsoft SQL: 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.)

 

Please help!

6 Replies

@vindev ,

 

Show error to whoever handles your database server. They should know what to do.

@vindev 

Certificate could be not published on your machine, perhaps switching off encryption of the connection could help. In general yes, that's database administrator question.

@Sergei BaklanOnly I am facing the problem. Rest of my colleagues dont have such issue. Do yuo still think it's a problem from server or something is wrong with my excel or laptop?

 

Thank you

@vindev 

 

We can bypass certificate trust. We shouldn't. It is a security threat. As an IT exec, I would instruct my DBA to fix the problem at the server. But if you really want to bypass it and you are using a connection string in VBA you need to add the parameter TrustServerCertificate=true;

 

https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax#using-trustse... 

 

https://blog.greglow.com/2020/01/16/sql-sql-server-the-certificate-chain-was-issued-by-an-authority-...

 

https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/connection-string-keywords-and-data-sour... 

 

@vindev 

 

This was the solution of my problem with excelconnection to SQL Server:

 

http://www.thesqlreport.com/?p=2050

 

for the DBA's searching, this was all fixed within excel, server/database permissions and certificates were not the issue.