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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Row Level Security WITHOUT user Email, based on userid

hey, quick question.

 

can i set up RLS without email? 

 

im looking to make RLS based on userid, can i achive this?

 

the end target is RLS with embedded PBI that based on userid parameter. 

 

how would i approach this ? would love some input. 

 

thanks 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

RLS is divided into dynamic and static, and dynamic requires the use of USERPRINCIPLENAME or USERNAME.

Using the username() or userprincipalname() DAX function

vstephenmsft_0-1672294657216.png

Depending on your requirements, you do not need to use the above two functions. You have static RLS here, which can be created after my example below.

Create two roles. One is the role of user ID123 and the other is the role of user ID456. Because my sample data is only 123 and 465, you create multiple characters based on your sample data.

vstephenmsft_1-1672294734618.png

vstephenmsft_2-1672294755484.png

vstephenmsft_3-1672294819235.png

The results of testing are as follows.

vstephenmsft_4-1672294828895.png

vstephenmsft_5-1672294838553.png

After you save your report in Power BI Report Server, you manage security and add or remove members on the server.

Add members to roles

 

 

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

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

RLS is divided into dynamic and static, and dynamic requires the use of USERPRINCIPLENAME or USERNAME.

Using the username() or userprincipalname() DAX function

vstephenmsft_0-1672294657216.png

Depending on your requirements, you do not need to use the above two functions. You have static RLS here, which can be created after my example below.

Create two roles. One is the role of user ID123 and the other is the role of user ID456. Because my sample data is only 123 and 465, you create multiple characters based on your sample data.

vstephenmsft_1-1672294734618.png

vstephenmsft_2-1672294755484.png

vstephenmsft_3-1672294819235.png

The results of testing are as follows.

vstephenmsft_4-1672294828895.png

vstephenmsft_5-1672294838553.png

After you save your report in Power BI Report Server, you manage security and add or remove members on the server.

Add members to roles

 

 

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.

Manoj_Nair
Solution Supplier
Solution Supplier

hi @Anonymous - try 

USERPRINCIPALNAME function, RLS authorization = USERPRINCIPALNAME()

Anonymous
Not applicable

hey, can you please elaborate more? 

 

i have RLS table with userid that connects to another table (customer table) using userid column, i want lets say userid 123 to see only customer 111 (user 123 is under customer 111) 

 

where do i need to put the USERPRINCIPALNAME? 

 

thanks 

 

 

@Anonymous here is the complete solution set we simulated for you. Let me know if this works for you. RLS tutorial  & documentation explain the step-by-step process to configure your RLS.

1. DATASETS MODEL

Manoj_Nair_0-1670257499006.png

2. TABLE RELATIONSHIP

Manoj_Nair_1-1670257499010.png

 

3. RLS ROLE PERMISSION

Manoj_Nair_2-1670257499018.png

4. RLS SECURITY

Manoj_Nair_3-1670257499029.png

5. ASSIGN USERS TO RLS ROLE

Manoj_Nair_4-1670257499033.png

6. FINAL OUTCOME WHEN USER LOGIN

Manoj_Nair_5-1670257499039.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors