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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Phanindra208
Regular Visitor

Power BI Embedded with Multi tenant web application

Dear team,
We recently integrated power BI Embedded with one of our product. The application is Asp.net webforms, multi tenant web application. which is hosted in Azure. Codes are common for all customers but databases will be different for each customer. based on URL we are connecting to the respective database.

 

Powe BI Implementation.

We created Power BI account and hard coded credentials at the code level. We able to authenticate account with tokens at the application level.

We created a group for each customer. Each group has the same set of reports but data source connection will be different, data source connection is pointing to the respective customer database.
Based on URL we are connecting to the group and populating reports at Web app level.


Am I doing right way?

 

The critical issue.

We created a PBIX which uses a Direct Query to a SQL Azure development database. To change database connection string from Dev environment to production environment, we tried Power BI embedded SDK predefined method.
client.Datasets.SetAllDatasetConnectionsAsync(DatasetID, ProdutionDBConnectionString).Result
This method not working at all, but every time we are getting success result.
Currently, we manually changing the connection strings through the Power BI portal after the importing the PBIX files.

Please help me how to resolve this issue?


Thanks & Regards,
Phanindra B.

2 REPLIES 2
vemulapalli26
New Member

We are trying to integrate Power BI dashboard into Webforms Application. Can you please share some URL's or pointers that i can use to accomplish this task.

 

Any help is very much appreciated.

Eric_Zhang
Microsoft Employee
Microsoft Employee


@Phanindra208 wrote:

Dear team,
We recently integrated power BI Embedded with one of our product. The application is Asp.net webforms, multi tenant web application. which is hosted in Azure. Codes are common for all customers but databases will be different for each customer. based on URL we are connecting to the respective database.

 

Powe BI Implementation.

We created Power BI account and hard coded credentials at the code level. We able to authenticate account with tokens at the application level.

We created a group for each customer. Each group has the same set of reports but data source connection will be different, data source connection is pointing to the respective customer database.
Based on URL we are connecting to the group and populating reports at Web app level.


Am I doing right way?

 

The critical issue.

We created a PBIX which uses a Direct Query to a SQL Azure development database. To change database connection string from Dev environment to production environment, we tried Power BI embedded SDK predefined method.
client.Datasets.SetAllDatasetConnectionsAsync(DatasetID, ProdutionDBConnectionString).Result
This method not working at all, but every time we are getting success result.
Currently, we manually changing the connection strings through the Power BI portal after the importing the PBIX files.

Please help me how to resolve this issue?


Thanks & Regards,
Phanindra B.


@Phanindra208

I don't think you should hard coded credentials. Since you mentioned that you created groups for individual customers so I think that your customers all have pro license and you're following Embed with Power BI users? In this case, people shall login individually to see the embedded reports. I may have license concern for the hard coded credentials and the RLS doesn't effect as all costomers login with the same hard coded credentials.

 

The SetAllDatasetConnectionsAsync shall work, before you debugding, can your try to call the REST API Set All Connections(here's a quick tool postman)? I think the method underlying is calling this API.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.