Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AdityaND
New Member

Getting an error while importing data from SQL Server

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

3 ACCEPTED SOLUTIONS
123abc
Community Champion
Community Champion

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:

  1. Open Power BI Desktop

  2. Go to File → Options and settings → Data source settings

  3. Select your SQL Server connection → Edit Permissions

  4. Under Encryption, choose "Enable SQL Server certificate trust"

"Encrypt connection" OFF (depending on your Power BI version),This instantly fixes the problem for most users.

OR

Update SQL Server certificate (if you control the server)

If you manage SQL Server:

  1. Open SQL Server Configuration Manager

  2. Go to SQL Server Network Configuration → Protocols for MSSQLSERVER

  3. Open Properties → Certificate tab

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

 

View solution in original post

123abc
Community Champion
Community Champion

Please also try this:

Install the certificate on your local machine (client-side fix)

If the server uses a self-signed corporate certificate:

  1. Export the certificate (.cer)

  2. Install it in your machine:

    • Trusted Root Certification Authorities

  3. Restart Power BI

This tells Windows that the certificate is safe.

Ask your IT / DBA

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

 

View solution in original post

Jaywant-Thorat
Super User
Super User

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/ 

 

 

View solution in original post

5 REPLIES 5
v-venuppu
Community Support
Community Support

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.

v-venuppu
Community Support
Community Support

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.

Jaywant-Thorat
Super User
Super User

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/ 

 

 

123abc
Community Champion
Community Champion

Please also try this:

Install the certificate on your local machine (client-side fix)

If the server uses a self-signed corporate certificate:

  1. Export the certificate (.cer)

  2. Install it in your machine:

    • Trusted Root Certification Authorities

  3. Restart Power BI

This tells Windows that the certificate is safe.

Ask your IT / DBA

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

 

123abc
Community Champion
Community Champion

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:

  1. Open Power BI Desktop

  2. Go to File → Options and settings → Data source settings

  3. Select your SQL Server connection → Edit Permissions

  4. Under Encryption, choose "Enable SQL Server certificate trust"

"Encrypt connection" OFF (depending on your Power BI version),This instantly fixes the problem for most users.

OR

Update SQL Server certificate (if you control the server)

If you manage SQL Server:

  1. Open SQL Server Configuration Manager

  2. Go to SQL Server Network Configuration → Protocols for MSSQLSERVER

  3. Open Properties → Certificate tab

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

 

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.