Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi all, I'm getting the following error while importing data from a 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.)
Details:
DataSourceKind=SQL
DataSourcePath=****; ****
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.)
ErrorCode=-2146232060
Number=-2146893019
Class=20
State=0
ConnectionId=4017e5f5-aedd-452d-9f43-9b95282392df
Solved! Go to Solution.
Power BI can connect to your SQL Server, but the SSL certificate on the SQL Server is not trusted by your computer.
This happens when:
The SQL Server is using a self-signed certificate
The certificate expired
The certificate was issued by an authority your machine doesn’t trust
Your organization recently enabled encrypted connections
Please try following:
Open Power BI Desktop
Go to File → Options and settings → Data source settings
Select your SQL Server connection → Edit Permissions
Under Encryption, choose "Enable SQL Server certificate trust"
OR
If you manage SQL Server:
Open SQL Server Configuration Manager
Go to SQL Server Network Configuration → Protocols for MSSQLSERVER
Open Properties → Certificate tab
Install or bind a valid SSL certificate issued by:
Your company CA, or
A trusted CA (e.g., Microsoft, DigiCert)
Restart SQL Server.
Can you please share your Power BI version and whether your SQL Server uses a self-signed or company SSL certificate.
If the server uses a self-signed corporate certificate:
Export the certificate (.cer)
Install it in your machine:
Trusted Root Certification Authorities
Restart Power BI
This tells Windows that the certificate is safe.
If you don’t manage SQL Server, share this message with your IT:
"Power BI is failing to connect because the SQL Server SSL certificate is not trusted.
Kindly confirm if encrypted connections are enabled and provide the trusted root certificate or disable ‘force encryption’ on SQL Server."
Hi @AdityaND
This is a common one. That error means the TLS/SSL certificate presented by the SQL Server isn’t trusted by the client (Power BI / gateway). The SQL driver opens a TCP connection fine, but during the SSL handshake Windows/.NET rejects the certificate chain. Error -2146893019 -> untrusted issuer / chain problem.
Try doing this:
Install CA root & intermediates on client/gateway (Local Computer → Trusted Root CA).
Ensure SQL Server cert CN/SAN matches the server name you use.
Ensure SQL Server sends full chain; replace cert if needed.
Restart any services (SQL Server and gateway).
Test with Power BI Desktop; if using gateway, test from Power BI Service after gateway restart.
Only use TrustServerCertificate=true for testing; replace with proper trust ASAP.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Jaywant Thorat | MCT | Data Analytics Coach
Linkedin: https://www.linkedin.com/in/jaywantthorat/
Hi @AdityaND ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.
Hi @AdityaND ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @Jaywant-Thorat @123abc for the prompt response.
I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.
Thank you.
Hi @AdityaND
This is a common one. That error means the TLS/SSL certificate presented by the SQL Server isn’t trusted by the client (Power BI / gateway). The SQL driver opens a TCP connection fine, but during the SSL handshake Windows/.NET rejects the certificate chain. Error -2146893019 -> untrusted issuer / chain problem.
Try doing this:
Install CA root & intermediates on client/gateway (Local Computer → Trusted Root CA).
Ensure SQL Server cert CN/SAN matches the server name you use.
Ensure SQL Server sends full chain; replace cert if needed.
Restart any services (SQL Server and gateway).
Test with Power BI Desktop; if using gateway, test from Power BI Service after gateway restart.
Only use TrustServerCertificate=true for testing; replace with proper trust ASAP.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Jaywant Thorat | MCT | Data Analytics Coach
Linkedin: https://www.linkedin.com/in/jaywantthorat/
If the server uses a self-signed corporate certificate:
Export the certificate (.cer)
Install it in your machine:
Trusted Root Certification Authorities
Restart Power BI
This tells Windows that the certificate is safe.
If you don’t manage SQL Server, share this message with your IT:
"Power BI is failing to connect because the SQL Server SSL certificate is not trusted.
Kindly confirm if encrypted connections are enabled and provide the trusted root certificate or disable ‘force encryption’ on SQL Server."
Power BI can connect to your SQL Server, but the SSL certificate on the SQL Server is not trusted by your computer.
This happens when:
The SQL Server is using a self-signed certificate
The certificate expired
The certificate was issued by an authority your machine doesn’t trust
Your organization recently enabled encrypted connections
Please try following:
Open Power BI Desktop
Go to File → Options and settings → Data source settings
Select your SQL Server connection → Edit Permissions
Under Encryption, choose "Enable SQL Server certificate trust"
OR
If you manage SQL Server:
Open SQL Server Configuration Manager
Go to SQL Server Network Configuration → Protocols for MSSQLSERVER
Open Properties → Certificate tab
Install or bind a valid SSL certificate issued by:
Your company CA, or
A trusted CA (e.g., Microsoft, DigiCert)
Restart SQL Server.
Can you please share your Power BI version and whether your SQL Server uses a self-signed or company SSL certificate.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 47 | |
| 32 | |
| 29 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 60 | |
| 58 | |
| 39 | |
| 24 | |
| 23 |