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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors