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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
marcelocostafil
Frequent Visitor

Embed report of PBI in an application instead of sample app

Hello!

 

First of all, I'm not used to work with other languages that aren't from Office/Power Platform.

 

I recently "built" an app using the "embed for your customers" .NET Core sample app. I'm hoping to use service principal authentication instead of master user, as it seems service principal is recommended for a production-quality embedding solution. I followed all of the applicable steps in the tutorial.

It is working fine! But the report opens in my localhost (as it should).

 

I have a folder that I usually put the html document and it opens in my application, but I cannot do that just just by publishing the sample app in that folder. Is there a simple way to just put all that configuration and show the report in my application?

 

I've searched for tutorials and foruns, but couldn't find any new information. If I haven't been clear enough, please let me know so I can share more details.

 

Considerations:

  • My Power BI workspace is new, and is a "Trial Fabric" workspace.
  • The above results are from the unmodified sample app. The only change I have made is populating appsettings.json with my app's Azure AD credentials: ClientId (ApplicationId), TenantId and ClientSecret. I have also populated the WorkspaceId and ReportId with the appropriate values from my Power BI workspace.
  • I am using an application secret, not a certificate. The docs and sample app support this as a viable option.
  • I have added the service principal as a workspace admin to the Power BI workspace specified in my appsettings.json.
  • I have enabled the switch in the admin portal of Power BI to allow service principals to use Power BI APIs.
1 ACCEPTED SOLUTION
marcelocostafil
Frequent Visitor

I "found" a solution.
In the end, I've changed to .NET Framework and could use in the production application.

I imported to the folder of my program and could open in the web.

Thanks!

 

View solution in original post

3 REPLIES 3
marcelocostafil
Frequent Visitor

I "found" a solution.
In the end, I've changed to .NET Framework and could use in the production application.

I imported to the folder of my program and could open in the web.

Thanks!

 

v-yangliu-msft
Community Support
Community Support

Hi  @marcelocostafil ,

 

According to my research, if you need to embed PBI reports into desktop/ applications, you may need to use embed for customer or embed for organization, the difference between these two embedding methods mainly lies in the validation method for report opening, you can check this official document for the specific difference:

Power BI usage scenarios: Embed for your customers - Power BI | Microsoft Learn

Power BI usage scenarios: Embed for your organization - Power BI | Microsoft Learn

Embed Power BI report in a Power BI embedded analytics application for your organization - Power BI ...

 

HTML is a purely static markup language that lacks inherent dynamic interactivity. However, we can achieve asynchronous web page requests and responses using AJAX (Asynchronous JavaScript And XML).

AJAX (Asynchronous JavaScript And XML) is a powerful technique for creating dynamic and interactive web applications.

javascript - Implementing Ajax calls for a REST API - Stack Overflow

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yangliu-msft.

 

Yes, I've already used the "embed for your customers" code in .net core to show my report in the localhost.

 

My problem is: I need to put this in my other application. Usually I import the solution to a folder of this application, and using a html document, I can open the page. But in this case, when I import the "embed for your costumers" solution to the folder, I can't find any html document to open this.

 

Do I need to create an html document that references the "embed for your costumers" solution?

 

Best Regards,
Marcelo Costa

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Kudoed Authors