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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Azure Sql Connection

Hi everyone, I have a problem with connecting to a sql on Azure. By connecting on Sql serve management studio I can get the connection to the database but if I try using sql server on power bi it gives me this error: "the specified server name does not match the server name in the SSL certificate of SQL Server", while if I use analysis services it does not reach the server and tells me that it is disabled or turned off. Can anyone help me? Has this happened to others?

I tried to do an odbc and pbi desktop connects while the service does not. I attach the connection string: "odbc:Driver={ODBC Driver 17 for SQL Server};DATABASE=******;Server=tcp:servername,1433;Uid=username;PWD=password;Encrypt=yes;TrustServerCertificate=yes;Connection Timeout=30;Authentication=ActiveDirectoryPassword;"

Thanks to everyone

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Anonymous - The SSL certificate mismatch error typically occurs when the server name in the connection string does not match the name in the SSL certificate. Azure SQL databases have specific formats for server names, such as your-server-name.database.windows.net.
Ensure that you’re using the correct server name format as per Azure standards. Also, verify in the Azure portal under Azure SQL Database that you’re using the exact server name provided.
If using Encrypt=yes;TrustServerCertificate=yes in the connection string doesn’t help, try removing TrustServerCertificate=yes to enforce stricter SSL requirements. This might require the correct server name in the SSL certificate to avoid mismatches.

 

If Analysis Services cannot reach the server, this could mean that the Analysis Services is not enabled or configured for the database you’re trying to connect to. In Azure, you may need to configure or provision an Azure Analysis Services resource separately if you haven't already.
Also, check if your Azure SQL Database firewall settings allow access from the IP address you’re connecting from.

 

Since your ODBC connection works in Power BI Desktop, but not in Power BI Service, this suggests that it might be a gateway or permission issue.
Ensure that you have installed and configured an On-premises Data Gateway for Power BI Service to connect to the Azure SQL database via ODBC. The gateway helps bridge Power BI Service with on-prem or cloud databases using ODBC connections.
In the Power BI Service, make sure to configure the data source under the Manage Gateways section, and use the same connection string as in Power BI Desktop.

Check the above details shared 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @Anonymous - The SSL certificate mismatch error typically occurs when the server name in the connection string does not match the name in the SSL certificate. Azure SQL databases have specific formats for server names, such as your-server-name.database.windows.net.
Ensure that you’re using the correct server name format as per Azure standards. Also, verify in the Azure portal under Azure SQL Database that you’re using the exact server name provided.
If using Encrypt=yes;TrustServerCertificate=yes in the connection string doesn’t help, try removing TrustServerCertificate=yes to enforce stricter SSL requirements. This might require the correct server name in the SSL certificate to avoid mismatches.

 

If Analysis Services cannot reach the server, this could mean that the Analysis Services is not enabled or configured for the database you’re trying to connect to. In Azure, you may need to configure or provision an Azure Analysis Services resource separately if you haven't already.
Also, check if your Azure SQL Database firewall settings allow access from the IP address you’re connecting from.

 

Since your ODBC connection works in Power BI Desktop, but not in Power BI Service, this suggests that it might be a gateway or permission issue.
Ensure that you have installed and configured an On-premises Data Gateway for Power BI Service to connect to the Azure SQL database via ODBC. The gateway helps bridge Power BI Service with on-prem or cloud databases using ODBC connections.
In the Power BI Service, make sure to configure the data source under the Manage Gateways section, and use the same connection string as in Power BI Desktop.

Check the above details shared 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.