Saturday, February 10, 2018

How to create Row Level Security to restrict Users from specific Data Views of the Power BI Report

How to Implement Row Level Security (RLS) in Power BI to restrict Users from specific Data Views of the Report
Row Level Security is a Security feature in Power BI Reports, that restricts the users to view the data in the report based on the User Roles assigned to their particular User Group.
Scenario:
If you want to allow the end users to view only the Sales in their specific Sales Region data, instead of viewing all regions, we can restrict them by defining the 
User Roles and assigning the Users to that User Group .
Example :
Suppose we have a Power BI Report , where we have the data of various Sales Regions like North America, Africa, Europe.


Now we will define the user roles on top of this report, based on the Sales_Region column as follows..

1) Go to Report tab Modeling  and then select the User Roles


2) Next Define the Team Name in Manage Roles and apply the required Filters on required Tables.
Here I have created to two Teams with below Filters on the Table vSalesByRegion :
Asia Team :
[Region_Name] = "Asia"

WorldWide_Team :
OR ([Region_Name]="Europe",[Region_Name]="North America")


Note :
We can implement the Dynamic Row Level Security (RLS), by mapping the UserId (if exists in the Model) to the USERNAME()USERPRINCIPALNAME() Functions of the Power BI.

3) Next validate the Roles by viewing the Report by defined Team Roles
View as Roles : Asia_Team:

Now the Report will shows only the Data for Asia Region as follows..
View as Roles : WorldWide_Team:
Now the Report will shows Data for Europe and North America Regions as follows..
4) Finally Publish the Report to Power BI Service and add the Users to the User Role Teams
Once we Publish Report to Power BI Service , we have to add the Users to the specific User Role Teams based on their Sales Region and requirement as follows..
In Power BI Service we will see the following things in the Work Space :
a) Dashboards
b) Reports
c) Datasets

Go to Datasets , then select our report Dataset on which we want apply the Row Level Security, as follows..
Click on the ...3dot icon next to the Dataset and then click on SECURITY option.
Next select the User Role Team ( Eg : Asia_Team) to add MEMBERS.
Next add the People or groups who belongs to this role, by specifying their email address.
Finally click Add.
Now People or groups who belongs to this role, will have access to view the data as per that Role definition we defined in Power BI Desktop Report.

Creating a Schedule Refresh Plan :
We can schedule the Power BI Reports to refresh automatically from Power BI Service
  • In the Work Space > Data sets , select your Report dataset and then click on ..3dot icon and then click on Schedule Refresh option.
  • On the Scheduled refresh page, select New scheduled refresh plan. 
  • On the New Scheduled Refresh Plan page, enter a description and set a schedule for when you want your data model to be refreshed. 
-------------------------------------------------------------------------------------------------------- 
Thanks, TAMATAM ; Business Intelligence & Analytics Professional 
--------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog