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

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.

Reply
Anonymous
Not applicable

Row-Level security: Making certain rows visible

Hello everyone,


this topic is about RLS, and unfortunately I'm not familiar with it yet.

I have a table "Order list" (a long list from Sharepoint) which is connected to PowerBI.
There is a column "E-mail", the e-mail address of the user who triggers the order is saved there.

The requirement is, that the logged in user should only see the rows of his own orders. By the measure

USER = USERPRINCIPALNAME()
the e-mail of the logged in user appears, but how can I make only the data of the orders visible which he triggered?
 
I have created a separate table which contains all the users and their e-mail addresses
and as I explained above, in the main table there is already a column with the e-mail.
Which steps are missing?

I would be so thankful if you could explain it step by step!
 
Best regards
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , based on what I got

 

Create a role and filter

'Order list'[Email] = userprincipalname()

 

 

refer if needed

How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

View solution in original post

@Anonymous , have you tested the role as view as the role and by passing email id?

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I've just tested it, indeed, it works! Thank you soo much!

 

 

 

Best regards

amitchandak
Super User
Super User

@Anonymous , based on what I got

 

Create a role and filter

'Order list'[Email] = userprincipalname()

 

 

refer if needed

How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

Anonymous
Not applicable

Thank you for your answer, I tried it but nothing changed.. I still can see the orders of my colleagues

@Anonymous , have you tested the role as view as the role and by passing email id?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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