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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.