Forum Discussion
Power BI Embedded: Last User's Database Parameter Affects All Users
Hi,
What you're seeing is expected with the current architecture. The main issue is that the gateway data source and database parameter belong to the shared semantic model, not to an individual embedded user's session.
So when User A connects and you configure the model for Database A, it works correctly. But when User B comes in and you update the same data source/parameter to Database B, you are changing the configuration used by the shared model. Power BI does not create a separate Direct Query database connection for User B.
That's why the behavior can look like:
User A → Shared Model → Database A
User B → Updates Model → Database B
User A → Shared Model → Database B
The Update Data source API updates the gateway data source configuration; it should not be used as a per-user database-switching mechanism.
What I would recommend is if the 1,800 databases have the same schema, the better design would be to have a common reporting source and use Dynamic RLS with Effective Identity.
Your .NET application can generate an embed token for each user and pass their district as the effective identity. RLS then filters the data for that district.
Ex. User A → Embed Token (District A)
→ Same Semantic Model
→ RLS
→ District A data
User B → Embed Token (District B)
→ Same Semantic Model
→ RLS
→ District B data
This is much safer for concurrent users because you are not modifying the shared data source when another user logs in.
One important distinction: RLS controls which rows the user can see; it does not switch the underlying SQL Server database. Therefore, if District A and District B must remain completely separate physical databases, RLS alone will not solve the problem.
In that case, you would need an architecture where the database/model is isolated per district, for example separate semantic models/data sources and selecting the appropriate model for the user. With ~1,800 databases, though, maintaining 1,800 Power BI models could become difficult to manage.
If possible, I would consider introducing a centralized reporting layer that combines the district data and includes a District/Tenant ID. Then Power BI can use one semantic model with Dynamic RLS + Effective Identity.
So in short:
- Do not update the shared gateway data source for every user login.
- Do not use a shared database parameter as a per-user session setting.
- If the data can be consolidated → Dynamic RLS + Effective Identity is the preferred approach.
- If databases must remain separate → consider isolated semantic models/data sources and model routing/binding.
The key point is that a Power BI Embedded session does not give each user an independent gateway data source configuration. The data source/model configuration you're changing is shared, which is why the last update can affect other users.
Hope this Helps!!