User Context - RLS Experience
Last updated
Last updated
To restrict the nodes visibility as per the user accessing the report, follow these steps:
Create a measure, using the USERPRINCIPALNAME to identify the email ID of the logged-in user:
In the visual:
Add the measure (created in step #1) in the Fields section:
Go to “Map Fields” and map the data in the “User Context” section:
Logged-in User Detail – Populate the DAX measure created in step #1
Filter Column – The column in the data, on which the logged-in user detail value must be matched to identify the record of the Lead/Manager who has logged in.
For example – If Alex is a manager who is viewing the report with his email alex@test.com, then the DAX measure will return the value “alex@test.com”. Now, in the Organization data, the visual needs to identify the record of Alex, only then its team can be plotted in the visual. So, we provide the “Email” column in the “Filter Column” field.
Open the “Display” section from the top pane – Click on Navigation – where we get the option of “User Context Behaviour” - Click on “Restricted Access”
With this implementation, a logged in user will be able to see only their own record and their subtree.
The result will be best visible in the Read Mode of the report.