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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
PrismaBI
Frequent Visitor

Change DataSource (DB specifically) by user logged in app

Hi guys, I have an embedded Power BI report in an app. I need to switch the datasource (database parameter) by the user logged in in the app. I explored the use of parameters, but I do not know how to retrieve the username in power query.

 

RLS is not a way since I have the customer's data stored in different databases (one per customer).

 

Is there a way for this?

2 REPLIES 2
PrismaBI
Frequent Visitor

Thanks Rico, but RLS, as I told, is not possible, I have one table per customer. Is there any way to fetch de logged in user of the app, filter a table with the user associated with the DB I need and then pass the DB name to Power Query?

Anonymous
Not applicable

Hi @PrismaBI ,

 

As far as I know, RLS is a good way to restrict the data for users in Power BI.

I think you can try to set the role in your dataset, then try to embed a report with RLS.

For reference:

Using standard cloud based row-level security with embedded content in Power BI embedded analytics -...

Best Regards,
Rico Zhou

 

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

 

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.