How To Test RLS in Power BI Service

Power BI is a widely used reporting tool in the market today. It offers rich integrations and visualization capabilities. Access to a specific user can be restricted at various levels to protect data. It is essential to test whether the security implementation is working as expected. Or, you may want to run a Power BI report as a different user. In that case, you might want to test RLS using different security roles. This article describes how to test RLS in Power BI service.

What is Power BI user access?

Power BI allows restricting access to users on the workspace, report level, and data level.

Authentication (Limit access to content)

Limit access to Power BI through the admin portal. So, users will have limited privileges in the Power BI workspace. If we use Power BI apps to share reports, we can limit access to report content in the app.

Authorization (Limit access to data using RLS in Power BI)

Limit access to data with row-level security (RLS). So, roles can be created in Power BI dataset with specific data access, and users or groups can be added to these roles.

How to implement RLS in Power BI?

Read this quick post to learn how to implement row-level security in PowerBI.

Steps to Test RLS in Power BI Service

1. Launch PowerBI.com and navigate to your workspace.

2. Navigate to the Power BI report using a shared dataset with the RLS you want to test.

how to test rls in power bi service

3. Click on the ellipsis icon () next to the Edit button, as shown in the below image.

4. On the Related content page, click the ellipsis icon () next to the shared dataset containing RLS. Click on Security.

Run Power bi report as different user

5. On the Row-Level Security page, click the ellipsis icon () next to the role you want to test. Click on Test as role.

Test as role in Power BI service

This should open the report (opened in step 2) you wanted to test with RLS.

5. Click on the dropdown arrow next to your selected role, as shown in the image below. You can now enter the email address or name of the person whose user access you would like to test. And Click Apply.

test rls in power bi service

6. Using the same dataset, You may repeat the steps to test Row-level security for other Power BI reports.

Although this process seems more complex, this is the only way to achieve this now. We hope that Microsoft will introduce a more sophisticated way to Test RLS in Power BI.

Pro tips:
1. If you want to test the Power BI report as user user1 for a particular role, user1 must be part of that role under the Row level security page.
2. You can also test Power BI access using Power BI desktop View as an option under the Modeling tab. It is recommended to TEST row level security in Power BI model using Power BI desktop first.
3. You can export all measures and calculated column expressions from Power BI desktop using a PowerShell script. Learn more about it here.
4. Refer to this article if you want to format seconds as h:mm:ss format in Power BI card visual.

We have seen how to test RLS in Power BI using the Power BI test as role feature.

See more

Kunal Rathi

With over a decade of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.
I am always interested in new challenges so if you need consulting help, reach me at kunalrathi55@gmail.com.

Shopping Cart
Scroll to Top