Forum Discussion
Power BI Embedded: Multiple Users Seeing the Last Logged-In District's Data
- 14 days ago
Thanks for describing the scenario clearly. The behaviour is consistent with how Power BI semantic model parameters work.
The parameter belongs to the shared semantic model, not to an individual user or embed session. Therefore, when User B changes the parameter to District B, the shared model configuration changes, which can cause User A to receive District B data. This should be treated as a data-isolation risk.
Also, Gateways - Update Datasource updates gateway datasource credentials; it is not intended to change the server/database connection.
Recpomended approach:- RLS / Effective Identity: Controls row-level access within a model; it does not switch a DirectQuery model between databases.
- Dynamic M query parameters: Not supported for switching data sources in the Power BI service.
- Separate embed tokens: Provide identity/permissions but don't create isolated model parameters.
For ~1,800 district databases, I recommend:
- One semantic model per district, configured once against its database, rather than changing a shared model parameter at login.
- Use service principal profiles to manage the large number of customer workspaces. Microsoft documents a 1,000-workspace limit per embedding identity; exceeding it puts the application into an unsupported state.
- Maintain one report and use dynamic binding to connect it to the appropriate district semantic model at embed time. Note the documented 1,000-data-source limit per user for dynamic binding, which should be considered in the final architecture.
- If the databases can eventually be consolidated, a single semantic model with dynamic RLS can be considered instead.
Thanks,
C Srikanth
Community Support Team.
We also use an on-premises data gateway. The gateway data source connection is updated dynamically using the Power BI Update Datasource REST API. Based on the server and database values, we update the corresponding database parameter in the Power BI report.