One of the most important aspects of designing and developing dashboards is managing user access.
Access control should be implemented at two levels:
- Row-Level Security (RLS)
- Page-Level Security (PLS)
In Power BI, only Row-Level Security (RLS) is natively supported. Before discussing the implementation, let’s briefly define these two security types:
- Row-Level Security (RLS): This type of security allows users with different access levels to see only the filtered data relevant to them in dashboards. For example, if a user with S1 access logs into the dashboard, they will only see data filtered for Store A1.
- Page-Level Security (PLS): This security method restricts user access to specific pages within a dashboard based on their permissions. For instance, if a dashboard contains pages P1 – P10, a user with S1 access can be restricted to viewing only P2, P3, and P9.
This article presents a custom approach to implementing Page-Level Security (PLS) in Power BI, as this feature is not directly supported by default.
Steps to Implement Page-Level Security (PLS) in Power BI:
- Create a Dataset:
- Define a dataset containing two columns:
- The user or group name
- The exact names of the dashboard pages that the user should have access to
- Define a dataset containing two columns:
- Define Roles in Power BI:
- Go to Manage Roles in Power BI and create roles based on the dataset from Step 1, assigning page access to each user or group accordingly.
- Set Up a Home Page with Navigation:
- Create a Home Page in the dashboard.
- Add a filter visual that dynamically displays the available pages based on user access.
- Implement an interactive button to navigate users to the selected page.
- Hide all other pages except the Home Page.
- Click on the Home Page and save the dashboard.
- Upload the File to Power BI Report Server (PBIRS On-Premise):
- Deploy the Power BI file to PBIRS On-Premise for access management.
- Configure Row-Level Security for Page Access:
- Go to Manage settings in PBIRS.
- In the Row-Level Security (RLS) section, assign users to appropriate Page-Level Security (PLS) roles.
- Once configured, users will only see the pages they have access to when they log in.
By following this approach, we can implement Page-Level Security in Power BI, allowing users to view only the relevant pages assigned to them.