Forum Discussion

chat_peters's avatar
chat_peters
Icon for Helper III rankHelper III
2 years ago

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

  • 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

    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.