I want to embed some Power Bi reports into an ASP.NET MVC Web application but Idk where to start, any help please.
-
Have you seen this post: stackoverflow.com/questions/45281634/… ?David Tansey– David Tansey2022-07-22 05:13:47 +00:00Commented Jul 22, 2022 at 5:13
-
Please provide enough code so others can better understand or reproduce the problem.Community– Community Bot2022-07-22 12:41:17 +00:00Commented Jul 22, 2022 at 12:41
1 Answer
Check this out Embed Power Bi and read this very carefully.
To embed your report in any web application. Below are the steps.
- 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
- Get the embedding parameter values. (Domain, TenantID, ClientID, ClientSecret, WorkspaceID, ReportID)
- Add the required NuGet packages.
dotnet add package Microsoft.Identity.Web
dotnet add package Microsoft.Identity.Web.UI
dotnet add package Microsoft.PowerBI.Api