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
Tairo
Helper I
Helper I

Power BI Embeded using direct query and RLS

I created a report and I am using RLS. The report is connected to a Azure SQL database using direct query. When I am testing RLS in the report it all works fine. I am using Power BI embedded to interate the report in my application. 

So I first publish the report to service. But when I publising the report I get a message "Publishing succeeded, but the published report cannot connect to the data source because we were unabaile to find a gateway. Please install and configure a gateway."

 

The data source is an Azure SQL database, so if I am right I don't have to use a gateway.

 

In Power BI service I can open the report. When I Don't pass indentities to the embed token API I can upload the report in my application. The moment I add roles and username and to the API the report is not uploaded.

 

When I use the same setup as described above with the only difference that I am using csv files instead of Azure SQL and direct query everthing works fine. I can pass username and roles to the API and RLS works fine.

 

Do I do something wrong or is it just not possible to use RLS in Power BI embedded in combiation with direct query?

 

Kind regards,

 

Arno

 

 

 

2 REPLIES 2
MWpower
Frequent Visitor

Have you got any answers to this since january?

I can't make it work too..

Hi MWpower,

With the help of MicroSoft I was able to figure out what the problem was. I was passing a fixed dataset id using the API. So PBI only worked using that dataset. I changed the script so that I can, besides Username and Role, also multiple datasets id's. That worked for me.

 

Regards,

Tairo

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.