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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Row Level Security in Power BI Embedded

Hi, 

 

I am a new user of Power BI and I am currently looking into the implementation of Row Level Security (RLS) in Power BI Embedded that is being used by my organisation. I have programmed a few lines at the backend side however there are a few queries I have and need further explanation. I went over the documentation but I felt that it has not been updated as majority of their code deals with methods for Version 2 (V2) of Power BI meanwhile we are using Version 3. 

 

I have programmed the following line of code as our backend is mainly programmed in C#: 

var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: canEdit ? "edit" : "view", null,
identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "username",
roles: new List<string> { "roleA", "roleB" }, datasets: new List<string> { "datasetId" }) });

However, what I am not able to fully grasp is the bigger picture. Both static and dynamic RLS is very easy to implement in Power BI Desktop but I am not able to connect the dots for the implementation of RLS in Embed Power BI.

 

1. I am unsure with regards to what next steps should I take. I have gone over the documentation https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security however I felt it was not very easy to follow and not up to date. 

 

2.  What I am not fully grasping is the concept of username, roles and datasets. With the code I have implemented, how do I determine what fields to fill in for the username, roles and dataset parameters. 

 

3. Let's say if I were to implement this code, would it be scalable. Currently we are making a POC for one of the clients and we want to implement this in the long term.

 

Any help and advise would be wonderful. 

Thank You

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous,

I found a GitHub sample about C# to use power bi embed with RLS. Pherpa you can take a look at the following link if it helps with your senior:

AppOwnsDataWithRLS 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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