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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
Resident Rockstar
Resident Rockstar

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors