The RLS is one of the security measures in Power BI that helps to protect sensitive data and prevent unauthorized access. This vide shows how to create dynamic RLS in PBI Desktop and invoked the RLS in the PBI Service.
Show More Show Less View Video Transcript
0:00
Hello and welcome to this video. In this video, I'm going to show you how to create
0:09
dynamic role level security in Power BI. So, let's get started. The role level security is one of the
0:18
security measures in the Power BI that helps us to protect sensitive data and prevent unauthorized
0:25
access. It is useful in helping to comply with data privacy regulations and policies
0:32
Let's see how we can implement this dynamic role level security using our sample data
0:39
Now in our dataset in the table view, we do have the account manager, Abiola and Aenoc
0:45
And of course we have the account manager id 1 and 2. So these are the email address of the two
0:51
account manager i'm going to come to the transactions table we can see the order id
0:58
order date ship date customer name account manager accounts manager id and so on and so forth
1:06
now i'm going to come to the model view and of course we have what's called a one-to-many
1:12
relationship you can see one so many relationship across the region and the fact table and of course we have the one to many relationship and then one to many relationship let come to the report view now in the report view we have a simple report
1:31
this is actually showing the account manager, the total sales and the email address
1:37
in this we have the total sales by year cluster column visualization
1:42
and of course we have the total sales by year table and of course we have the slicer
1:47
I'm going to click on Enoch in the slicer and there we go so we can see the report for Enoch account manager
1:55
So we want to invoke the dynamic role level so that Enoch is able to see only the reports that is associated to Enoch
2:05
I'm going to come to the modeling tab and click on manage roles
2:10
Now because we actually want to create a dynamic role level so I'm going to click on new and I'm going to rename
2:17
let's call this one user click enter so now the email address column is in the account managers
2:26
table so i'm going to click on account manager and then switch to dax editor inside the square
2:34
bracket i'm going to call the email address and check whether it is equal to the user
2:39
PrincipalNameDAX function So square brackets email equal to userPrincipalName So that done Just go ahead and click on save and there we go successfully applied roles changing so just go ahead and close this window for now so after we
3:00
done that i'm going to clear the filter from this enoch and then i'm going to come to the home tab
3:06
and publish the reports so just go ahead and save and then i'm going to publish into my workspace
3:14
So this is fine, double click. There we go, success. So we can actually open the rlsneo.pbix and see the report
3:26
Alright, so this is the report published to the Power BI Service and of course it is under my workspace
3:32
So what I'm going to do is to click on this horizontal ellipsis and I want to see related content
3:38
And then I can see the semantic models. click on this horizontal ellipses again and then I want to go to security and in
3:46
the security you can see we have zero so what I'm going to do is I'm going to add
3:50
enoch into this particular members so click on enoch and then click on add and
3:56
of course click on save and there we go so we have the user one user that's
4:02
already added so what I'm going to do is go back to my workspace and then I'm
4:07
I'm going to search for that particular report, RLS new. So I going to click on this share and I can actually type the name I will share share the report with Enoch so type in the email address and then click on it and
4:23
of course want to send a notification to the person so click on send so you can
4:28
see link to RLS new sent I'm going to head over to my Google Chrome and of
4:35
course I have the email address of Enoch there you go so you can see
4:40
Abiela Abiela has shared this part of the report with you so just go ahead and click on open this
4:47
report now let's see the moment of truth and there we go so you can see that Enoch is able to only
4:56
see the report that is associated to him so this is now showing Enoch and of course we can see in
5:03
the slicer we only have Enoch and of course these are the total sales by year, the total sales by year
5:09
for the clustered column charts. We can even go ahead and investigate. Now let's just take this
5:14
number the total sales for the central region which is 19 million 910. When I come to the
5:20
Power BI report and click on you know got it and let's filter for Enoch. So there you can see we
5:27
have the same result. So this is basically how we can create a dynamic row level security in Power BI
5:35
I hope you enjoyed this video, if you do, share with your friends, like. Thank you and bye for now. Cheers
#Business Operations
#Computer Security
#Enterprise Technology
#Data Management
#VPN & Remote Access
#Consumer Resources
#Identity Theft Protection


