Forum Discussion

PSA_Swayam's avatar
PSA_Swayam
New Member
7 years ago

How to implement Row Level Security in Power BI Embedded?

I am trying to implement row level security in Power BI Embedded downloaded code which has been downloaded from below URL.

https://github.com/Microsoft/PowerBI-Developer-Samples/tree/master/User%20Owns%20Data/integrate-report-web-app


I have found a solution which can be implemented in earlier version of Power BI reports code but that is not useful for me. Please find below URL for this.

https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security

I would seek your help to find a solution to implement Row Level Security in above code. I look forward for response on this. Thanks

 

 

5 Replies

  • Hi,

     

    I hardly require help to sort this out. Can anyone respond on this. Thanks

    • TedPattison's avatar
      TedPattison
      Microsoft Employee

      Are you using the App-Owns-Data model or the User-Owns-Data model?

       

      If you are suing the App-Owns-Data model you must generate an embed token with an EffectiveIdentity to map your user to a UserName and one or more roles. If you are using the User-Owns-Data and UserName is passed autoamtically and you must map each users to their RLS roles in the Power BI service.

       

      In either case you can use dynamic RLS with a Users table and a UserPermissions table. Can you be more specific about what you are trying to accomplish?

      • PSA_Swayam's avatar
        PSA_Swayam
        New Member

        Thanks for your response.

         

        I am using User-Owns-Data to implement my requirement.

         

        I have successfully implemented displaying reports list based on workspace/group id and able to display report data when user click on particular report from the list. This is working as expected.

         

        Now, I have to apply Row Level Security for the reports. i.e., based on the role of the user, report data to be filtered and only reports should be displayed based on filtered data. I have tried but didn't get a solution for this.

         

        Please see below screenshot of code to give you an idea how I am getting access token from authentication result. I am using the access token to get reports list and to display individual report.

         

        Lines of code to get Access TokenCode to get reports list using generated Access TokenCode to get selected report data using generated Access Token

        I think I need to make changes in code. But I would require your help to get this sorted. Thanks