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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Connect PowerBI to SQL Server - TrustServerCertificate

Hi there,

 

I have a problem with connecting my PowerBI desktop to my SQL server. I know 100% the problem lies with the 'TrustServerCertificate' attribute.

 

When logging into to SSMS, or creating and ODBC data source, I need to ensure TrustServerCertificate is true. However, when using the SQL server connector (and the Azure SQL Server connector) in PowerBI desktop, there is no option for it. I have tried writing SQL statement to change this, as that's the only option I have but none have worked.

 

I have tried

TrustServerCertificate=TRUE;

TrustServerCertificate=Yes;

With all different versions of capitals, semi-colons etc.

 

Am I missing something? What statement can I use to get PowerBI to TrustServerCertificate? 

 

Apologies if I posted this in the wrong place.

Thank you

 

 

5 REPLIES 5
JMLyle
Frequent Visitor

[System.Environment]::SetEnvironmentVariable('PBI_SQL_TRUSTED_SERVERS','<servername>', 'User')

 

pere_ramos
New Member

We did the temporary workaround using a SQL user instead of Active Directory authentication.

WalTig
Frequent Visitor

Sometimes you have to search in another direction. I read a lot about loading service certificate and/or setting "TrustServerCertificate" to true.

However, in our case (and it sounds more cases are like this) from one day to another the user (and only "one user") was not able to connect to SQL Server from power BI anymore. Nothing had changed in our environment. Solving the issue by some certificate did not sound right.

Try this (it solved our issue): make sure the user has the latest version of Power BI Desktop installed.

In Sep 2023 the user was still working with version May 2023. Just installing the newest version of Power BI Desktop enabled him to connect to SQL data again.

amitchandak
Super User
Super User

Anonymous
Not applicable

I haven't been able to get it to work with these links. First, I have restricted access and the second is throwing the same error.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.