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
chat_peters
Helper III
Helper III

Embed a Power BI report with dynamic row level security

Hello, 

I have a report with dynamic RLS set up and it works. I tested it in the service. Now let's say I have a thousand customers and I am wondering if I have to pass in each customer name to the username parameter in the following example.

 

Example microsoft article: https://learn.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls

 

 

{
"accessLevel": "View",
"identities": [
{
"username": "France",
"roles": [ "CountryDynamic"],
"datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
}
]
}

 

2 REPLIES 2
chat_peters
Helper III
Helper III

@amitchandak Thank you for responding to my post. My question is specifically about embedding a report with dynamic RLS. I have already implemented and tested the dynamic RLS role in the report and it works. What I am struggling to understand is the commands related to generating and embed token. The part of the article that's highlighted in yellow. Here's the link to the full article : https://learn.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls

chat_peters_0-1705777638738.png

These are my questions: Can I use customdata() function for the above username command?

I visited power bi embed playground (https://playground.powerbi.com/en-us/) but I don't see a place to test the RLS out (i.e view as a certain user). May be I am not seeing it. Please help if you have any experience embedding a power bi report with dynamic RLS.

 

amitchandak
Super User
Super User

@chat_peters , You need to use userprincipalname and table with email and access and filter dimension

 

Power BI- Row Level Security(RLS): Handle ALL, UserPrincipalName: https://youtu.be/KVLEnIUo4pc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.