cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
heoliv
Advocate I
Advocate I

Certificate Chain Not Trusted Error Effecting PowerBI Only

Hi,

 

In a SQL query that I have run several times before I am not receiving the following error: 

 

Message=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.)

 

However, I am still able to access the databases that I receive this error for on PowerBI via SQL Server Management Studio. 

 

Does anyone have any insight onto why I would suddenly be running into this issue after not having issues with the databases effected before and how to resolve it?

1 ACCEPTED SOLUTION

This ended up being a fairly easy solution, in order to work around this issue I ended up just having to switch the connection type from MSFT account to Windows for any who encounter this issue in the future. 

View solution in original post

10 REPLIES 10
duftnich03
Frequent Visitor

This worked for me too.

For those who want more detailed instructions:

  1. Open your Power BI Desktop app
  2. Click 'File'
  3. Click 'Options and Settings'
  4. Click 'Data Source settings'
  5. Select the offending SQL server instance, from the list of data sources
  6. Click 'Edit permissions' button at base of prompt screen
  7. In this new prompt screen, under the 'Credentials' section, click the 'Edit' button to open a new prompt and select 'Windows'
  8. Select either 'Use my current credentials' or 'Use alternate crednetials' (up to you, I just used mine)
  9. Click' Save' button to close this prompt and return to the 'Edit Permissions' prompt screen.
    • In here there is an 'Encrypt connections' option. If your server accepts encrypted connections this will need to be ticked, mine doesn't and so I left it blank.
    • If you're not sure, don't worry. When you click 'Refresh All' a prompt will tell you if you need to be unencrypted and you can come back and untick this box.


Does anyone know why this works?
In my organisation, my windows account is used as my MS account, so it is the same thing, so why does the MS option not work. It used to work, and has done for over a year, and what is more the Power BI cloud service data model continued refreshing, using the MS account, fine, whilst the desktop one refused too. Spoke with head of IT and he is is equally flummoxed, saying that becuase we use our windows accounts as our orgnisational MS ones, they're the same thing and so there should be no issue...feels like a Power BI glitch to me!

This worked for me! Thank you for the detailed instructions.

nicbottie-mon
Frequent Visitor

So, we're getting this error (similar to above) when connecting to the Azure Analysis Services Tabular Model, from Power BI Desktop...

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.)\r\nStackTrace:\n   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n   at Microsoft.Data.ProviderBase.DbConnectionFactory

Where can one specify "Connection Properties" and choose "Trust server certificate" in Power BI Desktop?
Microsoft Support ticket guides us to that setting, like you can set in SSMS when Connecting to a SQL Server...

In SSMS...In SSMS...

RamyaKanaka
Microsoft
Microsoft

I am getting this certificate error while i am trying to connect to SQL OnPrem source. I tried to connect to the same soure through excel and it works but it getting error in PowerBBi. 

 

Any help please!

v-yuezhe-msft
Microsoft
Microsoft

@heoliv,

Make sure that the certificate used by the SQL Server is within the Trusted Root Certification Authorities store of the machine running the Power BI Desktop.


There are a similar thread and a blog for your reference.
http://community.powerbi.com/t5/Desktop/provider-SSL-provider-error-0-The-certificate-chain-was-issu...
https://powerbi.microsoft.com/en-us/blog/ssl-security-error-with-data-source/

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lydia, I saw these threads but since the connection works in SQL Server Management Studio I thought it may be something else? If not how do I locate the Certificate Authority the database I am connecting to uses? Thanks for the insight.

@heoliv,

You would need to contact SQL Server database administrator about that where he stores the SSL certificate. Then import the certificate to the client computer that installs Power BI Desktop following the guide in the KB below.

https://support.microsoft.com/en-sg/help/316898/how-to-enable-ssl-encryption-for-an-instance-of-sql-...

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This ended up being a fairly easy solution, in order to work around this issue I ended up just having to switch the connection type from MSFT account to Windows for any who encounter this issue in the future. 

Hi Syndicate_Admin,

 

I am having the same problem, before testing this workaround what are the implications of doing this on users trying to access the report across the network?.

 

Also do you have any idea what the switching to Oauth2 would do?

This worked for me too, thanks!

Helpful resources

Announcements
March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors
Top Kudoed Authors