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

%3CLINGO-SUB%20id%3D%22lingo-sub-1673326%22%20slang%3D%22en-US%22%3EMS%20Excel%20Error%3A%20%E2%80%9CThe%20certificate%20chain%20was%20issued%20by%20an%20authority%20that%20is%20not%20trusted%E2%80%9D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1673326%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22s-prose%20js-post-body%22%3E%3CP%3EI%20am%20getting%20below%20error%20with%20Excel%20files%20which%20is%20retreving%20data%20from%20SQL%20Server.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDataSource.Error%3AMicrosoft%20SQL%3A%20A%20connection%20was%20successfully%20established%20with%20the%20server%2C%20but%20then%20an%20error%20occurred%20during%20the%20login%20process.%20(provider%3A%20SSL%20Provider%2C%20error%3A%200%20-%20The%20certificate%20chain%20was%20issued%20by%20an%20authority%20that%20is%20not%20trusted.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help!%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1673326%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1673372%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Excel%20Error%3A%20%E2%80%9CThe%20certificate%20chain%20was%20issued%20by%20an%20authority%20that%20is%20not%20trusted%E2%80%9D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1673372%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F795756%22%20target%3D%22_blank%22%3E%40vindev%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EShow%20error%20to%20whoever%20handles%20your%20database%20server.%20They%20should%20know%20what%20to%20do.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New 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!

4 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...