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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.