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
KevinRomo98
New Member

SSL error on the Service

The server name provided doesn't match the server name on the SQL Server SSL certificate.

 

Now I fixed this on my local Power BI Desktop by adding  PBI_SQL_TRUSTED_SERVERS as an environment variable, but when I published the report, I get the same error on the BI service when it attempted to refresh.

 

I am connecting to an Azure SQL database. Is there a way to set  PBI_SQL_TRUSTED_SERVERS on the service?

2 ACCEPTED SOLUTIONS
Akash_Varuna
Super User
Super User

Hi @KevinRomo98 , I think you would have to use a gateway to connect to Azure Db and then publish as i think there isnt directly a way to set env variable in service
If this post helped please do give a kudos and accept this as a solution 
Thanks In Advance

View solution in original post

Poojara_D12
Super User
Super User

Hi @KevinRomo98 

The error occurs because the server name in your Azure SQL Database SSL certificate does not match the one Power BI Service expects. While you fixed this locally in Power BI Desktop using the PBI_SQL_TRUSTED_SERVERS environment variable, this setting does not carry over to Power BI Service, as environment variables cannot be set there. Since Power BI Service does not allow modifying SSL trust settings directly, the best workaround is to ensure you use the exact server name as specified in the SSL certificate when configuring the data source in Power BI. Alternatively, you can switch to using Azure Private Link or a VPN to ensure a trusted connection. If the issue persists, consider using a Power BI Gateway, where you can control SSL settings more flexibly.

 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

5 REPLIES 5
v-hashadapu
Community Support
Community Support

Hi @KevinRomo98 , Thank you for reaching out to the Microsoft Community Forum.

Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

We thank you @Poojara_D12  and @Akash_Varuna for your prompt and appropriate replies.

v-hashadapu
Community Support
Community Support

Hi @KevinRomo98 , Thank you for reaching out to the Microsoft Community Forum.

Please let us know if your issue is solved. If it is, consider marking the answer 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @KevinRomo98 , Thank you for reaching out to the Microsoft Community Forum.

Please let us know if your issue is solved. If it is, consider marking the answer 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

Poojara_D12
Super User
Super User

Hi @KevinRomo98 

The error occurs because the server name in your Azure SQL Database SSL certificate does not match the one Power BI Service expects. While you fixed this locally in Power BI Desktop using the PBI_SQL_TRUSTED_SERVERS environment variable, this setting does not carry over to Power BI Service, as environment variables cannot be set there. Since Power BI Service does not allow modifying SSL trust settings directly, the best workaround is to ensure you use the exact server name as specified in the SSL certificate when configuring the data source in Power BI. Alternatively, you can switch to using Azure Private Link or a VPN to ensure a trusted connection. If the issue persists, consider using a Power BI Gateway, where you can control SSL settings more flexibly.

 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Akash_Varuna
Super User
Super User

Hi @KevinRomo98 , I think you would have to use a gateway to connect to Azure Db and then publish as i think there isnt directly a way to set env variable in service
If this post helped please do give a kudos and accept this as a solution 
Thanks In Advance

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.