Embedding Power BI Dashboard/Report in Power Apps Portal

INTRODUCTION

Power Apps Portals are recognized as an important block in any organization's long-range web strategy. Portals provide us a powerful capability to create external-facing websites that allow external and internal users to interact with data from Dynamics 365. In a recent release, Dynamics 365 Portals are now enriched with Power BI Embedded service that allows customizers to grant access to Power BI service components (dashboards, reports, and tiles) to external users who don't have a Power BI account or license. 

This blog post aims to provide a step-by-step guide to embed Power BI visualizations in Dynamics 365 Portal’s web pages. 

PREREQUISITE

This blog assumes that you have an up and running Dynamics 365 for Customer Service organization and a Global Admin user with Dynamics 365 and Power BI licenses. You might already have provisioned a Dynamics 365 Portal instance for your organization. If not, go to the Power Apps admin center, select the environment for portal setup, and provision a portal using one of the available templates as per your customer requirements, as shown below.

PREREQUISITE

Learn more about Dynamics 365

STEPS FOR POWER BI DASHBOARD AND PORTAL INTEGRATION 

Once your portal provision is complete, and Portal is up and accessible, you would follow the below guide to surface a Power BI report/dashboard on a Portal’s webpage. 

ENABLE POWER BI VISUALIZATION 

To embed dashboard/report on Portal’s webpage, first, you need to enable Power BI visualization from Power Apps Portals admin center, and for that: 

  1. Open Power Apps and select the environment where you have provisioned the Portal. 
  2. Go to Your Apps section from Power Apps home page and locate your Portal. Select More Commands (…) and click Settings. 

ENABLE POWER BI VISUALIZATION

  3. In the opened Portal settings pane, select Administration.

Portal settings pane

   4. Power Apps portals admin center is now opened in a new tab. Please note the Application ID on the  Portal Details page. You will need that in later steps. 

Power Apps portals admin center

  5. From the Power Apps portals admin center go to Set up Power BI Integration and click Enable Power BI visualization. 

Power Apps portals admin

  6. Click Enable from confirmation popup. A message will appear once Power BI visualization is enabled. 

CREATE AZURE AD SECURITY GROUP AND ADD TO POWER BI ACCOUNT 

To display reports or dashboards built-in Power BI workspaces on Portal’s webpage, we need to create a security group in Azure Active Directory, add Portal application as a member to this group, and add this group to Power BI account from the admin portal. 

  1. Go to Azure Portal and sign in with Global Admin user for your tenant. 
  2. From the left navigation, click on Azure Active Directory. From the opened page, select Groups and click on New Group from the top header. 

AZURE AD SECURITY

  3. On the New Group page, select Security in Group type and specify a suitable Group name/description. Click Create. 

Security in Group type

   4. Open the group you just created and click Members under the Manage section. Click on Add members from the top header. 

  5. Specify the Portal’s Application ID you noted earlier in the Add members search box. Select the item appearing in search results and click Select. 

power BI integration

   6. Now we need to add this security group to the Power BI service. Go to Power BI and sign in with the Global Admin user. 

   7. From the top right click on  -> Settings -> Admin Portal. 

admin portal

   8. From the Admin Portal, select Tenant Settings. Locate Developer Settings and expand Allow service principals to use Power BI APIs section. Enable it from radio button. 

Power BI APIs

   9. Select Specific security groups (Recommended) from Apply to option and search for your security group by name in the search box. Select the group and click Apply. 

Specific security groups

Learn more about AlphaBOLD’s BI services

CREATE POWER BI WORKSPACE AND PUBLISH REPORT 

In this step, we will create a workspace in Power BI and publish a new or existing report/dashboard to this workspace. 

  1. Go to the Power BI admin center using Global Admin user and create a new Workspace if it doesn’t exist already. 

CREATE POWER BI WORKSPACE

   2. Now open the Power BI desktop application, create a new report/dashboard using your data or open an existing report/dashboard that you want to display on Portal. I have created a sample report like this. 

Power BI desktop application

  3. Click the Publish command from the toolbar Share section. Select the workspace you created in step one or any workspace of your choice and press Select. A success message is shown when the report is published on the workspace. 

Publish command from the toolbar

   4. Now go back to your Workspace on the Power BI admin center and open the report you just published from the list of available contents. When the report is opened, copy the report URL from the address bar. 

Workspace on Power BI admin

ENABLE POWER BI EMBEDDED SERVICE FROM PORTAL ADMIN 

In this step, we will select the Power BI workspaces from which we need to surface reports or dashboards on the Portal’s webpages. 

  1. Go back to the Power Apps portal admin center. 
  2. Select Set up Power BI integration from the left pane and click Enable Power BI Embedded service. 

Power Apps portal admin center

   3. From the opened window, select the Power BI Workspaces you want to use and move to the Selected Workspaces column using arrow buttons and click Enable. A confirmation message is shown once the embedded service is successfully enabled. 

Power BI embed service integration

EMBED POWER BI DASHBOARD/REPORT TO PORTAL WEBPAGE 

The last step is to embed the Power BI report/dashboard to Portal’s webpage using the power bi liquid tag. 

  1. Go to Power Apps, and from the Your apps section on the Power Apps Home page, click Portal Management. 

power bi Portal Management

   2. Portal Management app is opened in new tab. Select Web Pages under the Content section and add a new Web Page. Choose the template, URL, and parent page of your choice and click Save. 

Portal Management app

    3. Open the Content Page from the Localized Content subgrid and go to Copy (HTML) section. Click on the HTML tab and add the powerbi liquid tag as shown. Please make sure to use the authentication type parameter as powerbiembedded for report or dashboard in workspaces. Paste the report URL you noted earlier in the path parameter. 

Power BI tag: {% powerbi authentication_type:"powerbiembedded" path:"Your report URL" %} 

Power BI report

  4. Add this Web Page to portal Web Link set if needed and browse to Portal in the new tab. Go to the Power BI web page, and you will see that the Power BI report is displayed there without needing any authentication or sign-in. 

Web Page to portal Web

CONCLUSION 

There you go! You have integrated a Power BI report/dashboard to Power Apps Portal’s webpageThis blog has provided you a step-by-step solution for Power BI and Portal integration. Please feel free to reach out to us should you have any queries or insights about this post. Please feel free to reach out to us should you have any queries or insights about this post.

Leave a Reply

Your email address will not be published.