Forum Discussion

vindev's avatar
vindev
Copper Contributor
Sep 16, 2020

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

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!

9 Replies

  • Micael_Carlsson's avatar
    Micael_Carlsson
    Copper Contributor

    vindev 

     

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

     

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

     

    • lmsparkle's avatar
      lmsparkle
      Copper Contributor
      for the DBA's searching, this was all fixed within excel, server/database permissions and certificates were not the issue.
  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    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.

    • vindev's avatar
      vindev
      Copper Contributor

      SergeiBaklanOnly 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

      • Craig Hatmaker's avatar
        Craig Hatmaker
        Iron Contributor

        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-trustservercertificate 

         

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

         

        https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/connection-string-keywords-and-data-source-names-dsns?view=sql-server-ver15 

         

Resources