Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have implemented RLS for the Organization hierarchy in the desktop version using the following DAX:
[EmailID] = "USERPRINCIPALNAME()"
||[Org Level 4] = "USERPRINCIPALNAME()"
||[Org Level 3] = "USERPRINCIPALNAME()"
||[Org Level 2] = "USERPRINCIPALNAME()"
||[Org Level 1] = "USERPRINCIPALNAME()"
Using "Test as roles" i tested it and it works fine. But it doesn't work in the app/web.
For example, the Manager is able to view his subordinates in the desktop version, but the cloud version shows blank values despite adding his id to the role created.
Any help is highly appreciated!
Cheers guys!!
Hi gdarshna
Did you solve this problem? If you did, let me know how! I also have the same problem.
HI @gdarshna,
I think you don't need add " symbol to dax formula.
If you add " character, it means you are try to find out 'Email ID' or 'Org Level' columns which has text "USERPRINCIPALNAME()".
In addition, I'd like to suggest you check on group permission, current only read permission members can enable the RLS feature.
Row-level security (RLS) with Power BI
If you publish your Power BI Desktop report to an app workspace within the Power BI service, the roles will be applied to read-only members. You will need to indicate that members can only view Power BI content within the app workspace settings.
Here is a list of the current limitations for row-level security on cloud models.
Regards,
Xiaoxin Sheng
Hi Xiaoxin Sheng!
Thank you for your quick response!
I tried to remove " and it's still showing blank values in the web.
Also, I'm publishing it to My workspace and not to the app workspace.
Any suggestions?
Hi @gdarshna,
Maybe you can try to use below formula as the RLS formula:
IF ( [EmailID] = USERPRINCIPALNAME () || [Org Level 4] = USERPRINCIPALNAME () || [Org Level 3] = USERPRINCIPALNAME () || [Org Level 2] = USERPRINCIPALNAME () || [Org Level 1] = USERPRINCIPALNAME (), TRUE (), FALSE () )
Regards,
Xiaoxin Sheng
It's still the same 😞
Works in the desktop but gives blanks in the web 😞
Hi @gdarshna,
Please write measures to display the result of ‘USERPRINCIPALNAME’ and 'USERNAME' functions.
Then, you can create card visuals with above measures to show the function result to ensure if current user is in the specific columns.
Sample measure:
USERNAME = USERNAME() USERPRINCIPALNAME = USERPRINCIPALNAME()
>>Also, I'm publishing it to My workspace and not to the app workspace.
BTW, RLS also not works on dataset owner.
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.