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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
jkeizer
Frequent Visitor

RLS not working for composite model with multiple layers

Hi,

 

I have the following setup in an Embedded workspace:

Datamodel with RLS > Datamodel > Report 

 

I'm a workspace admin. When trying to access the report in our app using a defined role I get the an error: "Operation returned an invalid status code 'BadRequest'".

 

The following set-up without the extra datamodel does workDatamodel with RLS > Report. 

Is there any way to setup RLS for a composite model with multiple levels?

 

Best,

Joery

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @jkeizer ,

Please check whether the parameters like report id/dataset id in your code are correct.

I think you can try to post a Rest API to generate a Embed token for the report with RLS.

For refernece:  Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Here is a solved post with similar issue like yours, I think you may refer to it to learn more details.

Solved: Re: Power BI send “invalid status code 'Bad Reques... - Microsoft Power BI Community

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yanjiang-msft
Community Support
Community Support

Hi @jkeizer ,

Please check whether the parameters like report id/dataset id in your code are correct.

I think you can try to post a Rest API to generate a Embed token for the report with RLS.

For refernece:  Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Here is a solved post with similar issue like yours, I think you may refer to it to learn more details.

Solved: Re: Power BI send “invalid status code 'Bad Reques... - Microsoft Power BI Community

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yanjiang-msft ,

 

I did learn that my initial question wasn't great. To clarify: I have a dataset/report with a direct query connection to another Power BI dataset. That second dataset has the RLS. 

 

Trying to generate a token it now I either get: 

"Embedding a report with a model which has a Direct Query connection to another model is not supported with V1 embed token" or "Creating embed token with multiple identities is not supported".
 
Am I doing something wrong or is this not possible (yet)? 
 
Best,
Joery

Nevermind, I got it to work. Thank you for sending me in the right direction.

Anonymous
Not applicable

hey @jkeizer, how did you manage to make it work? Apparently facing the same issue here

Hi @Anonymous ,

 

Make sure you add all relevant dataset id's in your token request. We had a model with ~5 linked dataset's and all needed to be included. The identity/role only needs to be set on 1 dataset. If I recall correctly that fixed it for us. We also include "xmlaPermissions""ReadOnly" for each dataset but I'm not sure if that was necessary. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors