Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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
Proud to be a 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
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |