Forum Discussion

Bhavik13101991's avatar
Bhavik13101991
New Member
15 days ago
Solved

Power BI Embedded: Multiple Users Seeing the Last Logged-In District's Data

Hi, We have a Power BI report embedded in our .NET application. We use DirectQuery, and our SQL Server production environment contains around 1,800 databases. In Power BI, we pass a database paramet...
  • v-csrikanth's avatar
    14 days ago

    Hi Bhavik13101991​ 

    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:

    1. One semantic model per district, configured once against its database, rather than changing a shared model parameter at login.
    2. 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.
    3. 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.
    4. If the databases can eventually be consolidated, a single semantic model with dynamic RLS can be considered instead.


    Thanks,
    C Srikanth
    Community Support Team.