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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

RLS Functionality

Hi Guys,

 

I need help with RLS.

 

I have multiple tables in my project and I have one user table and i want if a user logs in then he should only see the data based on his role. can someone help me with this?

 

Should i use the filter like username = username ()

 

What expression can I write for ID. 

 

Himanshu_13_0-1602489032479.png

 

 

Regards,

Himanshu 

1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

Hi, @Anonymous 

Userprincipalname() refers to the email adress that the user is currently using. This means that the ID column must contain the user email for this to work. Furthermore, the users table needs to be connected by relationship to the tables that needs to be filtered. 

[ID] = userprincipalname()

 
You can try out the RLS roles in Power BI Service to simulate how the report looks when viewing as different users. 

You can find this functionality under "Security" in the dataset options of the published dataset. 


image.png

 

Br, 
J


Connect on LinkedIn

View solution in original post

2 REPLIES 2
tex628
Community Champion
Community Champion

Hi, @Anonymous 

Userprincipalname() refers to the email adress that the user is currently using. This means that the ID column must contain the user email for this to work. Furthermore, the users table needs to be connected by relationship to the tables that needs to be filtered. 

[ID] = userprincipalname()

 
You can try out the RLS roles in Power BI Service to simulate how the report looks when viewing as different users. 

You can find this functionality under "Security" in the dataset options of the published dataset. 


image.png

 

Br, 
J


Connect on LinkedIn
amitchandak
Super User
Super User

@Anonymous , Not very clear.

 

Refer if this can help

RLS - Row Level security
https://community.powerbi.com/t5/MBAS-Gallery/Microsoft-Power-BI-Unleash-row-level-security-patterns...
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.