Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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 work: Datamodel with RLS > Report.
Is there any way to setup RLS for a composite model with multiple levels?
Best,
Joery
Solved! Go to Solution.
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 @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:
Nevermind, I got it to work. Thank you for sending me in the right direction.
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
42 | |
30 | |
27 | |
27 |