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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Power BI RLS - Extracting User Membership Dynamically

 

We have a security requirement within our Client to restrict data viewed the locations they manage.  I wanted to get some thoughts/inputs about your experience/research in Power BI Security Enablement.

 

Typically, I usually approach RLS (Row level security) within Power BI using one of the approaches below.

 

  1. Static Security (Define security roles with static filters applied to each security role)
  2. Dynamic security ( Dynamic security via User Principal – UPN/ Mapping Table between User Principal and Locations stored within data base)

 

We wanted to explore if it is possible to dynamically extract user memberships (Active directory)  of the logged in user that would then drive the security restriction of locations the user can view/see.

Is it possible to extract parameters beyond UPN within Power BI.

Can I pass UPN as a parameter within Power Query (In case i want to extract data via graph API for a particular user)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

If I understand it correctly, your purpose is to be able to either get some personal information of the login user to perform a dynamic RLS without having to create and maintain the Mapping table in the model, or to query data from the data source dynamically according to the login user. However I'm afraid this is not supported currently.

 

Here are the answers to the questions:

Is it possible to extract parameters beyond UPN within Power BI?

Power BI itself does not support extracting Active Directory user memberships or attributes beyond the User Principal Name (UPN) within the service. 

Can I pass UPN as a parameter within Power Query (In case i want to extract data via graph API for a particular user)?

Regarding your question about passing the UPN as a parameter within Power Query to extract data via the Graph API for a particular user, Power Query does not natively support dynamic data operations based on the user's UPN due to its static query nature. Both username() and userprincipalname() are DAX functions, which are not supported in Power Query. 

 

Hope this would be helpful. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

 

If I understand it correctly, your purpose is to be able to either get some personal information of the login user to perform a dynamic RLS without having to create and maintain the Mapping table in the model, or to query data from the data source dynamically according to the login user. However I'm afraid this is not supported currently.

 

Here are the answers to the questions:

Is it possible to extract parameters beyond UPN within Power BI?

Power BI itself does not support extracting Active Directory user memberships or attributes beyond the User Principal Name (UPN) within the service. 

Can I pass UPN as a parameter within Power Query (In case i want to extract data via graph API for a particular user)?

Regarding your question about passing the UPN as a parameter within Power Query to extract data via the Graph API for a particular user, Power Query does not natively support dynamic data operations based on the user's UPN due to its static query nature. Both username() and userprincipalname() are DAX functions, which are not supported in Power Query. 

 

Hope this would be helpful. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Anonymous
Not applicable

Thanks ! Your feedback was very helpful.

_AAndrade
Super User
Super User

Hi,

Take a look at this blog: https://radacad.com/dynamic-row-level-security-with-profiles-and-users-in-power-bi
I think yo can find what you're looking for.
Please let me know if this solve your problem or if you have any doubt please ask me.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




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.

Top Solution Authors