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.
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:Â
- Open Power Apps and select the environment where you have provisioned the Portal.Â
- Go to Your Apps section from Power Apps home page and locate your Portal. Select More Commands (…) and click Settings.Â
 3. In the opened Portal settings pane, select Administration.
  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.Â
 5. From the Power Apps portals admin center go to Set up Power BI Integration and click Enable Power BI visualization.Â
 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.Â
- Go to Azure Portal and sign in with Global Admin user for your tenant.Â
- From the left navigation, click on Azure Active Directory. From the opened page, select Groups and click on New Group from the top header.Â
 3. On the New Group page, select Security in Group type and specify a suitable Group name/description. Click Create.Â
  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.Â
  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.Â
  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.Â
  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.Â
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.Â
- Go to the Power BI admin center using Global Admin user and create a new Workspace if it doesn’t exist already.Â
  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.Â
 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.Â
  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.Â
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.Â
- Go back to the Power Apps portal admin center.Â
- Select Set up Power BI integration from the left pane and click Enable Power BI Embedded service.Â
  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.Â
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.Â
- Go to Power Apps, and from the Your apps section on the Power Apps Home page, click Portal Management.Â
  2. Portal Management app is opened in a 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.Â
  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” %}Â
 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.Â
CONCLUSIONÂ
There you go! You have integrated a Power BI report/dashboard to Power Apps Portal’s webpage! This 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.