Tuesday, March 23, 2021

Power BI with Power Apps Portals - Part-3

 Portals are now becoming ubiquitous as a Customer / Partner / Employee engagement channel. They can provide valuable information to a large audience. There is a need to embed dynamic visualizations, dashboard and reports in a Portal. This is very much possible now using Power Apps and this blog discusses how visuals from Power BI can be embedded into Power Apps Portals.

In my earlier blog I had mentioned about getting started with Power BI and Dynamics 365 Power BI template apps. This is a continuation and Part-3 of the Power BI with Dataverse series of blogs. 

An embedded Power BI dashboard can provide valuable information to the user when logged into the Power Apps Portal. Its great that one can create powerful visualizations but when the visuals drive insights and is showcased to a large # of users the value of the visual increases exponentially for the organization.

Power BI embedded in Power Apps Portals

Assuming you have a Power BI report or dashboard ready and a Power Apps Portal created in the same environment. The following steps will help you embed a Power BI report in Power Apps Portals. 

1. Configure Power Apps Portal

Go to Power Platform Admin Center and select your Portal 

Enable Power BI visuals

Click on Manage Power BI embedded service and select the workspaces that you have the Power BI reports and dashboards to be shown on the Portal.

Select Workspaces

Now you have configured the Portal for embedding Power BI. While you are on the managing Portal select Portal Details copy the application ID of the Portal. It will be useful in the next step.

Portal App ID

2. Set up Azure AD security group

We will need a Azure security group with the CRM Portal as a member. This security group will be given access to Power BI API. This will enable the display of visuals in the Portal.

Log in to Azure and create a new Security Group in Azure Active Directory. 

Security Group
Add Microsoft CRM Portal as member of the security group. Apply the Portal application ID to the member. 
Add member
Add the above security group to the Power BI Tenant Developer settings as shown below. This will allow the Portal to use Power BI API.
Allow to user Power BI API

Now we have completed most of the setup required. Next step is to configure the Portal and add the Power BI report and or dashboard to the Portal.

3. Embed Power BI visual in the Portal

Go to make.powerapps.com and select your portal and click on edit. This will open the Power Apps Portal Studio.
Here you can select to add a new page to the Portal or add a section to an existing page to display the Power BI visual.
One of the components you can add to a page or section is Power BI.
Add Power BI component

Once the component is added you will get the options to select the Workspace > Dashboard or Report to add to the Portal.
Add Power BI visuals as component

Things to note -
1. Users who log in to the Portal will need to be authenticated using AAD. 
2. Users will need Power BI license to view the visual
3. The Power BI dashboard or report will need to be shared with the user

I hope the above was helpful in embedding Power BI visualizations in to your Power Apps portals. Let me know if you have embedded Power BI in your Portal or custom websites.

Thank you

@mihircrm
365WithoutCode