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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
d_vendramini
New Member

Using Active Directory logged user to filter data

Hello everyone, I have three tables:

- Sales (including a field called AgentID)

- ADUsers (picking up from the Active Directory Domain) where my agents are. There's a field called UserEmail.

- UserAgentID which I maintain: it has the AgentID and the UserEmail associated.

 

There's a relationship between the three of them. I would like to apply dinamically the AgentID filter on the Sales table depending on the AD user logged in PBI Service. How can I achieve this?

 

For example:

Sales Table

AgentIDValue
123$ 150
456$ 200
789$ 75

 

ADUsers

UserEmail
john.green@aaa.com
mary.white@aaa.com
tracy.brown@aaa.com

 

UserAgentID

UserEmailAgentID
john.green@aaa.com123
mary.white@aaa.com456
tracy.brown@aaa.com789


If john.green@aaa.com logs in, I would like PowerBI to apply the filter "AgentID = 123" automatically in order to show only $ 150.

 

Many thanks,

Damiano

1 REPLY 1
Anonymous
Not applicable

You need to use Row-level security (RLS) with Power BI. The conditions are set in Desktop mode and then permissions are given in PBI services (cloud). 

 

Quick and simple to set up. Take a look at the following information. Essentially, you will create locked filters depending on the user accessing the dashboard at the time. 

 

User A can only see Data with Filter A 

User B can only see Data with Filter B

etc.. 

 

https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls 

https://www.youtube.com/watch?v=9wN33rTaiB4 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.