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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Dynamically Update Query Based on User ID

Hi ,

Data are gathered from a SQL Server database.

 

When a user logs into the web app, I'd like for the queries to update based on that user's ID. So, something like the statement below where the "userid" value dynamically changes.

 

select * from table where userid = 1234

 

My initial thought was to use row level security, but since we have hundreds of users, setting up the individual role for each user seems like an inefficient process. I don't want to add the userid as a filter since a user could clear the filter and then see other user's information.

 

Passing the userid as part of a URL parameter would be ideal .

 

Has anyone come across this requirement before? Any thoughts or suggested solutions would be greatly appreciated.

 

Thanks!

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

It is not supported to use dynamic URL parameter to implement RLS in Power BI Service currently .There is an idea about this issue, please vote it up, RLS in web publications , to improve the Power BI.

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

We also submitted this feedback to the product group internally, so that the product group can pay attention to this problem and speed up the issue repairing.

 

You may set Row-Level Security (RLS) to manage roles, please see the link Power BI Desktop Dynamic security cheat sheet, which described the detailed steps. Maybe it doesn't work, there are some tips to let it work and test it efficiently.

 

Best Regards,

Amy

 

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

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

It is not supported to use dynamic URL parameter to implement RLS in Power BI Service currently .There is an idea about this issue, please vote it up, RLS in web publications , to improve the Power BI.

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

We also submitted this feedback to the product group internally, so that the product group can pay attention to this problem and speed up the issue repairing.

 

You may set Row-Level Security (RLS) to manage roles, please see the link Power BI Desktop Dynamic security cheat sheet, which described the detailed steps. Maybe it doesn't work, there are some tips to let it work and test it efficiently.

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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