Row-Level Security (RLS) for Power BI Desktop
We can use row-level security (RLS) with Power BI Desktop to restrict data access for specified users. However, filters restrict data at the row level. Also, we can define filters within roles. Some of the features of row-level security (RLS) are –
- Firstly, you can now configure RLS for data models imported into Power BI with Power BI Desktop.
- Secondly, you can also configure RLS on datasets that are using DirectQuery, like SQL Server.
- Also, for Analysis Services live connections, you configure Row-level security on the on-premises model. However, the security option doesn’t show up for live connection datasets.
Steps to define roles and rules in Power BI Desktop
We may define roles and rules within Power BI Desktop using the following steps –
- Firstly, import data into your Power BI Desktop report, or configure a DirectQuery connection.
- Secondly, from the Modeling tab, select Manage Roles.
- Thirdly, from the Manage roles window, select Create.
- Next, under Roles, provide a name for the role.
- Further, under Tables, select the table to which you want to apply a DAX rule.
- Then, in the Table filter DAX expression box, enter the DAX expressions. This expression returns a value of true or false.
- Once you have created the DAX expression, select the checkmark above the expression box to validate the expression.
- Lastly, select Save.
Steps to validate the roles within Power BI Desktop
Once you have created your roles, test the results of the roles within Power BI Desktop
- Firstly, from the Modeling tab, select View as Roles.
- Secondly, the View as roles window appears, where you see the roles you’ve created.
- Then, select a role you created, and then select OK to apply that role.
- The report renders the data relevant for that role.
- Now, you can also select Other user and supply a given user.
- Lastly, select OK.
Row-Level Security Limitations
Some of the limitations for row-level security on cloud models are –
- Firstly, in case you previously defined roles and rules in the Power BI service, then you must re-create them in Power BI Desktop.
- Secondly, you can define RLS only on the datasets created with Power BI Desktop. If you want to enable RLS for datasets created with Excel, you must convert your files into Power BI Desktop (PBIX) files first.
- Lastly, only Import and DirectQuery connections are supported. Further, live connections to Analysis Services are managed in the on-premises model.
Prepare for Assured Success
Want to qualify DA-100: Analyzing Data with Microsoft Power BI exam? Learn MoreAre you preparing for DA-100: Analyzing Data with Microsoft Power BI exam?Take a Quiz