Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
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
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:
Regards,
Xiaoxin Sheng
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.