Forum Discussion

Bhavik13101991's avatar
Bhavik13101991
New Member
21 hours ago

Power BI Embedded: Last User's Database Parameter Affects All Users

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 parameter to connect the report to the appropriate district's database.

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.

Each user belongs to a specific district, and the report should display data only from their respective district/database.

We are facing an issue when multiple users log in at the same time.

For example, User A logs in from District A, and the report connects to the District A database and displays the correct data.

Then User B logs in from District B, and the gateway datasource and database parameter are updated for District B.

After User B logs in, User A also starts seeing District B data.

It appears that the latest updated gateway datasource/database parameter is being used by all users instead of maintaining a separate database connection for each user's embedded report session.

Our current architecture is Power BI Embedded with a .NET application, DirectQuery, an on-premises data gateway, and approximately 1,800 SQL Server databases in production. The gateway datasource is updated through the Power BI Update Datasource REST API based on the server and database required for the user.

What is the recommended approach for this architecture? How can we ensure that each user's embedded Power BI report independently connects to the correct database without affecting other concurrent users?

Would Dynamic RLS, effective identity, separate datasets/datasources, or another Power BI Embedded approach be appropriate for this scenario?

Any guidance on how Power BI handles gateway datasource updates, parameters, and DirectQuery connections for multiple concurrent embedded users would be greatly appreciated.

Thanks!

No RepliesBe the first to reply