- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, got same issue and solved now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An exception occurred: 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.) (Session ID: bc331829-2703-45b6-8774-5dcf513cbb99, Region: southafrica)
I still get this issue when i am trying to use dataflow on powerbi service using gateway connections, i have tried all methods, but its not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue:
This issue occurs due to mismatches between the versions of Power BI and SQL Server. To resolve it, please follow the steps below, how to install SSL Certificate from your local machine which is available from sql server installed machine.
Steps to Resolve:
Export the Certificate:
- On the server where SQL Server is installed, open MMC (Microsoft Management Console).
- Load the Certificates snap-in for the Computer account.
- Navigate to the certificate being used for SQL Server (typically found under Personal > Certificates).
- Right-click the certificate and select All Tasks > Export.
- Export the certificate without the private key in .cer format.
Install the Certificate on the Client:
- Copy the exported .cer file to the client machine.
- On the client machine, open MMC and add the Certificates snap-in for the Computer account.
- Import the .cer file into the Trusted Root Certification Authorities store.
Restart SQL Server Service:
- After the certificate is trusted, restart your SQL Server service and retry the connection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Wanted to add that there is a new issue we received a fix from MS from, looks fairly recent (starting Feb 13 2024). We were getting "certificate chain not trusted" errors on servers for Power BI Reports that previosuly worked no issue, no change anywhere.
Documented here, search "PBI_SQL_TRUSTED_SERVERS": https://learn.microsoft.com/en-us/power-query/connectors/sql-server
Can confirm after 3 days of trial and error, adding this environment variable (PBI_SQL_TRUSTED_SERVERS) to "Environment variables for your account" with the problem server name did the trick. I did have to clear out the Connection data (File > Options and Settings > Data source settings - select DB and Clear Permissions). Then add the data source back.
Adding this to all the top Google hits to hopefully save others the pain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@deanj20 Man, I want to thank you. You probably saved me hours of work, research and frustration!
This worked for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes you have to search in another direction. I read a lot about loading service certificate and/or setting "TrustServerCertificate" to true.
However, in our case (and it sounds more cases are like this) from one day to another the user (and only "one user") was not able to connect to SQL Server from power BI anymore. Nothing had changed in our environment. Solving the issue by some certificate did not sound right.
Try this (it solved our issue): make sure the user has the latest version of Power BI Desktop installed.
In Sep 2023 the user was still working with version May 2023. Just installing the newest version of Power BI Desktop enabled him to connect to SQL data again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Sometimes you have to search in another direction. I read a lot about loading service certificate and/or setting "TrustServerCertificate" to true.
However, in our case (and it sounds more cases are like this) from one day to another the user (and only "one user") was not able to connect to SQL Server from power BI anymore. Nothing had changed in our environment. Solving the issue by some certificate did not sound right.
Try this (it solved our issue): make sure the user has the latest version of Power BI Desktop installed.
In Sep 2023 the user was still working with version May 2023. Just installing the newest version of Power BI Desktop enabled him to connect to SQL data again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

One of my team member is facing similar issue. However the problem here is, he cannot switch to Windows Authentication mode due to same not being provided to every one for data security. We had given him datareader credentials and it was working fine for him till last few days since he start recieving this error. So any help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This worked for me- thank you!! Any idea as to why what caused it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This worked for me too.
For those who want more detailed instructions:
- Open your Power BI Desktop app
- Click 'File'
- Click 'Options and Settings'
- Click 'Data Source settings'
- Select the offending SQL server instance, from the list of data sources
- Click 'Edit permissions' button at base of prompt screen
- In this new prompt screen, under the 'Credentials' section, click the 'Edit' button to open a new prompt and select 'Windows'
- Select either 'Use my current credentials' or 'Use alternate crednetials' (up to you, I just used mine)
- 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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Super!!! Thanks this worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Super!! This really worked for me. Thanks for the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This worked! Thank you!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This worked for me .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This worked for me! Thank you for the detailed instructions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@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
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-09-2024 09:06 AM | |||
10-16-2024 01:41 AM | |||
Anonymous
| 12-02-2024 11:38 AM | ||
07-26-2024 03:47 PM | |||
06-19-2019 08:46 AM |