Power BI has become the choice of tool when we talk about Reports, Power Apps portal has built in reporting and charts but if are looking for modern dashboard and reports embedding Power Bi in Power apps portal is the way to go, In this blog we will look into the different ways that could be done,
Before any of this could be done we need to Setup and enable Portal for Power Bi Visualization, here is the detailed steps from Microsoft Documentation for enabling Power Apps portal for Power Bi Visualization and embedded service which allows powerbi liquid tag to work in Portal
Here is the list of Key steps involved, but refer to Microsoft doc for detailed steps
Enable: Power Bi Visualization
Navigate to Power Apps portals admin center and under Set up Power Bi Integration select “Enable Power Bi Visualization” and go through the prompt for enabling it.
Enable: Power BI Embedded Service
Power Bi embedded service requires Power Bi reports to be part of a named Workspace, The workspace should be created prior to enabling Power BI Embedded Service on Power Apps portal.
Click on “Enable Power Bi Embedded service”, this will bring up a pop up window to select the Power Bi workspace to be used by Power Apps portal.
Setup Up Security : Create security group and add to Power BI account
- Create AD Group: Navigate to Azure AD Directory in Azure Portal and create a New group “Power BI Embedded service”
- Add Portal as Group member: Add portal Application id( its available on Power Apps Portal admin center) as group member
- Power Bi Setup: Navigate to tenant Settings under Power Bi Admin center, under Developer settings set “Allow service principals to use Power BI APIs” as enabled and add the previously created security group to the list.
Once you are done with above steps , we are ready to add Power Bi Reports to power Apps Portal,
Method 1: Publish to Web – Power Bi Report publicly available.
If you have a Power Bi report which contains non sensitive data and can be published to the Web, you can embed using “Publish to Web” feature of Power Bi.
Publish Power BI report to Web : Navigate to your Power Bi Report and under Embed Report, select “Publish to Web”.
This will generate a Embed code, copy the Link embed code.
Navigate to Power Apps Portal studio and open/create the webpage where you want to add the report.
Add the Power Bi Component to the page
Set the access Type to “Publish to Web” and paste the embed code copied previously and save the page.
Navigate to the Portal page and the report will be available for viewing.
Method 2: Embed for your organization – Power Bi Report publicly available.
Create your Power Bi report you want to publish under the Power Bi workspace you have defined during Power Bi Setup earlier. once the Report is created navigate to Power Apps portal page in Portals Studio.
Add the Power Bi Component to the page and choose access type as “Embed for your organization” and select the report previously created
Navigate to the Portal page and the report will be available for viewing, You will need to be signed in using AD account to be able to access the report.
In the Next Blog we will embed the Power Bi Report in Power Apps portal using Customer mode and apply Row Level security, stay tuned.