cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
odumna
Frequent Visitor

Create new gateway with OAuth2 authorization

Hello

 

Could you please help me to understand the reason of my issue and what I shoud to check and configure ...


I tried to create new gateway with OAuth2 authorization to SQL Server database.

However I got error:
Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

ActivityId: d92248fd-1f67-4b58-97e1-16c0a7f81063

RequestId: 2a599971-cf07-4c36-8948-d1aff0fa714d

URI кластера: https://api.powerbi.com

Код состояния: 400

Время: Wed May 18 2022 18:20:01 GMT+0300 (Восточная Европа, летнее время)

My account has access to sql sever database amd I am able to connect using SQL managment studio as well.

3 REPLIES 3
TomMartens
Super User
Super User

Hey @odumna ,

 

I assume your SQL Server is running on-premises?
What version of SQL Server are you using?
How do you authenticate against the SQL Server from Power BI Desktop?

Do you want to pass the current Power BI user to the SQL Server or do you want to use a "fixed user" that is used by the gateway connection?

This article describes a little how you can configure a gateway with oAuth authentication but this works only with SQL Azure.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hello , Tom

I use  SQL Server is running on-premises.
I am using Microsoft SQL Server 2019.
I use windows authorization type in Power BI Desktop to connect to Sql server database.
Now I need to create gateway that will pass to database current powerbi user credentials.
I need it because I have RLS on database level on some tables.

Hey @odumna ,

 

what you need is to configure Kerberos to enable communication between

PBI Service -- hop1 --> on-premises gateway -- hop2 --> SQL Server
This article gets you started: https://www.linkedin.com/feed/update/urn:li:activity:6932050287683600385?commentUrn=urn%3Ali%3Acomme...

And this one: Configure Kerberos for Power BI reports in Reporting Services - Guy in a Cube

 

If the the SQL Server and the om-premises gateway are in the same branch of the local AD it's quite straightforward.

Hopefully, this provides what you are looking for to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors