How to connect the Powerbi Report Server to sqlserver with "force encryption" enabled

Sun, Dong Wei (IN IT CN RS) 0 Reputation points
2024-12-26T11:09:08.14+00:00

Dear Support:

we are trying to setup the PowerBI report server on our local environment, and according to our security policy, we are forced to activate the "force encryption" in SQL server, which makes us not able to connect to database successfully with below error message:

Could not connect to server: A connection was successfully established with the server, but then an error occurred during the login process. provider: SSL provider, error:0 - The target principal name is incorrect.

and here I can confirm I can use the same connection user (domain user) to log on the DB via SSMS successfully if I check the option "trust server certficate"; if I don't check the option, I will get the same error message.

so seems like we need to maintain the "trust server certificate" somewhere in the PowerBI Report Server, but no document found so far.

thanks.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,221 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,961 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 114.6K Reputation points MVP
    2024-12-26T11:22:23.32+00:00

    I don't use Power BI Report Server myself, but when googling for possible solutions, I found this blog post from Adam Saxton at Microsoft who knows this stuff well: https://powerbi.microsoft.com/en-my/blog/ssl-security-error-with-data-source/

    It's a different solution than Trust Server Certificate, but it also a better solution, because with Trust Server Certificate you are open for man-in-the-middle attacks.


  2. ZoeHui-MSFT 38,956 Reputation points
    2024-12-27T02:07:22.86+00:00

    Hi @Sun, Dong Wei (IN IT CN RS),

    Go to File->Options and Settings -> Data Source Settings in Power BI Desktop, select your SQL data source and tick "Encrypt connections".

    User's image

    If this does not work, you may try to connect to sql server data via OLEDB.

    User's image

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.