Enhance Your Application’s Data Insights By Integrating With Power BI Reports

What is Power BI Embedded?

How does Power BI Embedded help?

  • As an independent software vendor (ISV) developer, you have the option to include fully interactive and integrated Power BI resources into a custom application for your customers.
  • With Power BI Embedded, you can add embedded analytics into an application with the help of different visuals that help business users to access the business data, perform queries, and generate insights using this data within the application.
  • The end user requires no Power BI license to view or interact with the Power BI content.
How to embed Power BI reports in a custom application
  • At first, the user launches the application, POINTR in this scenario, from the web browser.
  • POINTR then calls to Azure Active Directory to obtain an access token that allows it to call the Power BI Service.
  • Then, POINTR calls the Power BI Service API to retrieve data to be embedded about a specific Power BI resource.
  • POINTR then passes this data to be embedded along with a security token to the code running in the web browser.
  • The code running in the browser then calls the Power BI JavaScript API to embed the Power BI resource.
  • The Power BI JavaScript API dynamically creates the iframe and initializes the embedded resource.
  • The JavaScript code in the browser calls the third party application, HubSpot in this scenario, to run an email campaign for the selected customers.
  • The third party application (HubSpot) then provides the acknowledgment on successfully running an email campaign.


Power BI Report Integration

Step 1: Register your application in Azure Active Directory (Azure AD)
  • Registering your application with Azure Active Directory allows you to establish an identity for your application and specify permissions (Read, Write and Update) to Power BI REST APIs.
  • You need to mention Application name, Application type, Redirect URL and delegate all permissions to API access. To grant permission, Azure user should have the “Global Admin” rights.
  • Register application type as Native app as you’re working with a non-interactive login.
Step 2: Setting up the Power BI Service Environment
  • In order to embed your Power BI reports in the application, you need to place them in the workspace in the Power BI Service.
  • The master account (Power BI Pro account) must be the Admin of the app workspaces used in your application.
  • Using Power BI Desktop publish all your reports to workspace used in the application.
Step 3: Embedding Power BI report into your application
  • Microsoft provides App Owns Data sample code, which can be downloaded from GitHub.
  • You need Visual Studio (version 2013 or later) with the latest NuGet packages to work with it.
  • To run the application successfully, you need to mention the following fields in code –
    • Application ID: This can be found in Azure Active Directory where you have registered your application
  • App Workspace ID & Report ID: This can be found in URL on Power BI Service when you open any report.
  • Master Account Username & Password: The credentials of Power BI Pro license account
  • Custom filters by passing parameters through URLs
  • Custom navigation in the web application for reports
  • Developed Custom Visuals for reports
  • Workflow automation by integration with HubSpot/Mailchimp to create Email Campaigns