Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pbrenneise
Frequent Visitor

RLS and UserPrincipalName()

Hi folks,

 

I took my first foray into implementing RLS in a report that I published from PBI Desktop to our firm's Power BI Service environment, but it, unsurprisingly, hasn't been working. I've been studying a solution here:

 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Configure-Row-Level-Security-with-OR-conditio...

 

Using the above thread, I setup a test RLS table with a handful of "authorized" users, which I would use as a filter in tandem with userprincipalname() to ensure only they can see this report. I used a variation of this DAX expression as a filter for each table in my report:

 

= CONTAINS('RLS', 'RLS'[Email Address], USERPRINCIPALNAME())

 

User NameEmail Address
User 1user email
User 2user email
User 3user email

 

Unfortunately, it doesn't work. What should this filter being set against left of the "=" sign? If its a column like [Email Address], I get errors stating the column couldn't be found and/or is now allowed in the expression. Also, the aforementioned thread suggested that the RLS I set up doesn't need to be given a relationship to any of the tables in the model, which seems contradictory to other solutions I've read (unless I missed something). Appreciate the help in understanding this better. 

 

Best,

 

pb

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pbrenneise ,

 

Try this in the Table Filter DAX Expression.

= [Email Address]= USERPRINCIPALNAME()

vstephenmsft_0-1657613597975.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @pbrenneise ,

 

Try this in the Table Filter DAX Expression.

= [Email Address]= USERPRINCIPALNAME()

vstephenmsft_0-1657613597975.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VahidDM
Super User
Super User

Hi @pbrenneise 

 

Check this link and related blog posts as well:
https://radacad.com/what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.