Applying Page-Level Security in Power BI

|
| By Sonali Sharma

Power BI provides built-in Row Level Security (RLS) to control data access, but it doesn’t have a direct way to show or hide pages for different users. However, we can create a workaround using user roles to limit access to specific pages.

Suppose the Admin user should have access to all reports in Power BI, while the Agent user should only have access to the dashboard page.

Steps to Apply Page Level Security

Follow these steps to control page access:

1. Create a Roles Table

We need a table to define different user roles. For this example, we create two roles:

  • Admin: Can access all pages.
  • Agents: Can access only one page.

2. Define Roles in Power BI
  • Go to ModelingManage roles
  • Create two roles:
    • Admin: [Role] = “Admin”
    • Agents: [Role] = “Agents

3. Create a DAX Measure for Visibility

We will write a DAX measure that controls button visibility based on the user’s role. This measure will ensure that only Admin users see the special analysis page button.

4. Configure Buttons

To navigate between pages, we need buttons.

  • Go to InsertButtons → Select Blank button.
  • Add text and set up page navigation.

For pages visible to everyone, buttons are configured normally. For Admin-only pages:

    • Use Text Conditional Formatting linked to the DAX measure so the button text only appears for Admins.

    • Use Action Conditional Formatting so only Admins can click the button.

 

5. Hide Restricted Pages

Go to the Page Navigator and hide the page that Agents users shouldn’t access.

6. Publish to Power BI Service

Upload your report to Power BI Service.

7. Assign Security Roles
  • In Power BI Service, go to the DatasetSecurity
  • Assign users to the Admin or Agents roles.

8. Test Page Security

Use the Test as Role feature in Power BI Service to check access:

  • Admin users should see all pages and buttons.
  • Agent users should not see the restricted page or its button.

Conclusion

While Power BI does not have a built-in way to hide pages, we can use roles, DAX measures, and button navigation to control access effectively. This method helps ensure that users only see the pages relevant to them, improving security and user experience.

Leave a Reply

Your email address will not be published. Required fields are marked *