0

I want to embed some Power Bi reports into an ASP.NET MVC Web application but Idk where to start, any help please.

hanan
  • 11
  • 1

1 Answers1

0

Check this out Embed Power Bi and read this very carefully.

To embed your report in any web application. Below are the steps.

  1. Configure your Azure AD app and service principal.

you'll use a service principal to authenticate you're web app against Azure AD. You'll also need an Azure AD app which will enable you to generate an Azure AD token. The Azure AD token enables your web app to call Power BI REST APIs and embed Power BI items such as reports, dashboards or tiles.

Note : To embed a Power BI report, it must be authorized by Azure AD. In regard to that, we have to create Azure Ad application and give the right permissions. Use article

  1. Get the embedding parameter values. (Domain, TenantID, ClientID, ClientSecret, WorkspaceID, ReportID)
  2. Add the required NuGet packages.

dotnet add package Microsoft.Identity.Web

dotnet add package Microsoft.Identity.Web.UI

dotnet add package Microsoft.PowerBI.Api

  1. Enable server side authentication. Link
  2. Build your app's client side. (api call and embed code for power bi reports) Link
  3. Run your application.