Following on from my last blog on RLS, I will now demonstrate how to initiate the roles created in Power BI Desktop. Whilst the desktop version is great for testing security, you have to configure the report in the Power BI Service to enforce permissions.
Before doing anything, ensure you have published a report with RLS onto the Power BI Service. If you would like to use my workbook as the example to follow, leave a comment below.
Configure Power BI Service
1. Navigate to the Datasets tab and click the ellipsis button (‘…’) on the ‘RLS Part 2’ dataset (or whatever you have called your published report). The select the Security option.
2. Let’s assign two email accounts to the users ‘Stephen’ and ‘Amy’. These must use a work domain – Hotmail, Outlook, etc. accounts are not permitted with Power BI. Click Add when you are happy.
3. Ensure the RLS roles are saved. You will end up with the following:
4. The roles are now configured. Both email accounts will only see data for the person they have been assigned to.
NOTE: You can add numerous email accounts to a specific role. For this example, the roles are done by person, but you may want to add a whole department containing 10 people to a given role.
Testing Roles using Power BI Service
This is actually really simple. Go back to the Security settings (shown above). Click the Ellipsis button and select ‘Test as Role’.
You will now only see sales data for the Sales Representatives that report to Stephen.
RLS is now out of preview mode and released into General Availability. Whilst the capabilities are still pretty new, the additional DAX layer over the GUI enables more complex security capabilities. As with all features in Power BI, regular updates are to be expected – so if RLS currently isn’t fit for your scenario, it could be very soon.
o Reza Rad’s Blog – http://radacad.com/row-level-security-configuration-in-power-bi-desktop
o Power BI Community Blog – https://community.powerbi.com/t5/Community-Blog/Row-Level-Security-in-Power-BI/ba-p/31031
o Devin Knight’s Blog – https://devinknightsql.com/2016/07/01/power-bi-row-level-security/