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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AntonioAngel
Frequent Visitor

Rest API to query dataset with RLS

Hello,
I am trying to use the rest API to execute Queries In Group as:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/executeQueries

Nevertheless, as it states in the limitations, this is not possible with RLS.
I have ensured  the settings 'Allow service principals to use Power BI APIs' and have permissions enough to query (no RLS reports work fine).

Does anyone know if there is any workaround to query RLS datasets? Most of our reports have RLS and this is a real issue

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Most of our reports have RLS and this is a real issue

 

Couldn't have said it better.  The real issue here is RLS.  Re-evaluate if the dataset really, really needs to have RLS.

 

As you have mentioned, RLS and service principals are fundamentally incompatible. There is no workaround.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Most of our reports have RLS and this is a real issue

 

Couldn't have said it better.  The real issue here is RLS.  Re-evaluate if the dataset really, really needs to have RLS.

 

As you have mentioned, RLS and service principals are fundamentally incompatible. There is no workaround.

Thanks for your reply! I noticed that when I create a Power Automate flow, it allows me to query Datasets regardless of whether they are RLS or not.
Should I understand there is no way to reproduce the same with the API? (or with any other connection that can be established with R, Python, or other languages). 

I noticed that when I create a Power Automate flow, it allows me to query Datasets regardless of whether they are RLS or not.

That is not a good thing, by the way.  The reason is that in order to run dataset queries from the Power Automate action you need to specify the workspace and you need to be a member of that workspace.  That is a very unfortunate and entirely unnecessary limitation.

 

To work around that, write your own custom connector against the Power BI REST API.

lbendlin_0-1698953738595.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.