Embedding Power BI reports into Power Pages brings together powerful data visualization capabilities and a seamless user experience for your portal users. In this blog, we’ll walk through the steps to integrate Power BI with Power Pages and explore the different methods to embed reports into your portal.
Here’s a step-by-step guide to embedding Power BI reports into your Power Pages portal:
Go to the Power Platform Admin Center.
From the left-hand menu, select the Environment in which you want to enable the Power BI settings. Once you're in the desired environment, click on Settings in the top.
In the Settings menu, click on Features under the Product section.
Under the Features section scroll down and Find the Power BI setting and turn it on. This will enable you to integrate and use Power BI components within your environment.
Now, open the Power Pages Studio and sign in with your credentials.
In Power Pages Studio, click the three dots in the right corner of your site dashboard and select Admin Center. This will automatically open the Site Settings in the Power Platform Admin Center.
In the Site Settings, find the Power BI Visualization option.
Toggle the Power BI Visualization setting to Enable. This allows embedding Power BI visualizations in your Power Pages site.
Similarly, find the Power BI Embedded Service option and toggle it to Enable. This setting allows you to embed Power BI reports and dashboards into your site.
Select Edit workspaces and choose the appropriate workspace
After Clicking on Edit workspaces Enable the workspace you're working on in the status and update the changes.
Step 3: Azure AD (Entra ID) Settings:
Go to https://portal.azure.com and sign in with your administrator credentials.
In the Azure portal, from the left-hand navigation pane, click on Azure Active Directory. If you can’t find it, use the search bar at the top to search for Azure Active Directory or Microsoft Entra ID.
Create a Security Group: Under the Manage section, click on Groups.
Click on + Add New group at the top. In the Group pane, select Security as the group type. Enter a Group name, a Group description, and select the appropriate Membership type (e.g., Assigned, Dynamic User, etc.). Click Create to create the security group.
Add Members to the Group:
Once you are in the Groups section, you will see a list of all the groups in your directory. Look for the group you created earlier (e.g., “Power BI Embedding Group”). Click on the group name to open its details page.
Inside the group settings, look on the left-hand side for the Members section and click on it. This will display a list of all members currently in the group.
At the top of the Members page, click the + Add members button.
In the search box that appears, type the names or email addresses of users you want to add, or if you’re adding the Power Pages Application service principal, search for “Portal” (or the service principal name). Select the user(s) or service principal from the list and click Select.
Once you’ve selected the members, confirm they are listed and click Save to finalize the changes.
Go to Power BI Admin Portal:
Open the Power BI Service by going to Power BI. In the left-hand menu, click on the Settings gear icon at the top right corner.
In the Settings menu, select Admin Portal from the dropdown.
In the Admin Portal, on the left sidebar, click on Tenant settings under the Power BI Service section.
Look for the setting labelled “Embed content in apps” under Developer settings. Toggle this setting to On. This setting allows embedding Power BI content (reports, dashboards, etc.) in custom applications, such as Power Pages.
After enabling the setting, look for the option to Apply this setting to specific security groups.
Click on Add a group to assign the appropriate Azure AD security group to this setting. Search for and select the security group you created earlier (e.g., "Power BI Embedding Group"). Once the security group is selected, click Apply.
Now Look for the setting labelled “Service principals can use APIs”. Enable this setting to On.
After enabling the setting, look for the option to Apply this setting to specific security groups. Click on Add a group to assign the appropriate Azure AD security group to this setting. Search for and select the security group you created earlier (e.g., "Power BI Embedding Group"). Once the security group is selected, click Apply.
In the Export and Sharing settings, look for the Publish to web option. Toggle the Publish to web setting to On. This will allow users to publish Power BI reports publicly via a URL.
Below the Publish to web setting, you'll see the option to Apply this setting to specific security groups. Click Add a group to assign the same Azure AD security group you created earlier (e.g., "Power BI Embedding Group"). After selecting the group, click Add to apply the setting to that security group.
After enabling all the settings, you can now embed Power BI reports on portal pages.
There are two main ways to add reports to your portal pages:
Method 1: Using an IFrame
Open your Power BI. Navigate to the report you want to embed.
In the top-left corner of the report, click on the File menu. From the dropdown, select Embed Report and then choose Embed for your website or portal.
A dialog box will appear with the Embed URL. Copy the Embed URL provided. This URL will be used in the IFrame component.
Open your Power Pages portal where you want to embed the Power BI report. Navigate to the specific page where you want the report to appear.
In your portal editor, select or add a section where you want to place the Power BI report. Look for the option to add an IFrame component or use a HTML component to embed custom code.
Once you’ve added the IFrame component, in the settings or properties panel, find the Source or URL field. Paste the Embed URL you copied from Power BI into this field.
Once the IFrame is set up with the embed URL, save the changes. Publish or preview your page to ensure the Power BI report is embedded correctly.
Now, you can view the report you created in Power BI within the Power Pages portal (e.g., Contoso Mortgage Portal).
Method 2: Using Liquid Template with Anonymous Authentication
Open the Power BI Service at Power BI. Like above, Navigate to the report you want to embed. In the top-left corner of the report, click on the File menu. Select Embed and then choose Embed for your website or portal. Copy the Embed URL provided. This URL will be used in the Liquid template to embed the report.
Go to the Power Pages portal where you want to embed the Power BI report. Open the page editor where you want to add the report.
In the editor, locate where you want to insert the Power BI report. Add a Liquid code block to the section of your page.
Use the following syntax to embed the report in your Power Pages portal with anonymous authentication:
{% powerbi authentication type: "anonymous" path:"<path of the report>" %}
Replace <path of the report> with the embed URL of your Power BI report that you copied earlier.
After adding the Liquid code block with the embed URL and authentication type, save your changes. Publish or Preview your page to ensure the report is embedded and visible.
Once you have completed these steps, your Power BI report will be successfully embedded in your Power Pages portal.
Frequently Asked Questions (FAQ’s):
1. Can I embed Power BI reports for external users who don’t have a Power BI license?
Yes, you can embed Power BI reports for external users using the Embed for Customers method. This allows users to view the reports without needing a Power BI license. Access is managed through Power Pages authentication, ensuring secure sharing with your external audience.
2. Can I embed Power BI reports in Power Pages without authentication?
Yes, you can embed Power BI reports without authentication by using Publish to Web. This option makes the report publicly accessible on the web, and no authentication is required. However, this should only be used for non-sensitive or public data, as anyone with the URL can access the report.
3. How do I enable Power BI integration in Power Pages?
To enable Power BI integration in Power Pages, follow these steps:
1. Power Platform Settings: Go to the Power Platform Admin Center, select your environment, and enable Power BI settings under Features.
2. Power Pages Settings: In Power Pages Studio, open Site Settings and enable Power BI Visualization and Power BI Embedded Service options.
3. Azure AD Settings: Create a security group in Azure AD, add necessary members, and configure permissions in the Power BI Admin Portal.
4. Power BI Settings: In the Power BI Admin Portal, enable Embed content in apps and Service principals can use APIs for the appropriate security group.
4. Is it necessary to have Power BI integration enabled in Power Pages before embedding reports?
Yes, Power BI integration must be enabled in Power Pages to embed reports. You need to enable the Power BI Visualization and Power BI Embedded Service options in the Power Pages settings. This allows Power BI components to be used within your portal.
5. Do I need to configure Azure AD settings to embed Power BI reports in Power Pages?
Yes, configuring Azure AD settings is necessary to embed Power BI reports in Power Pages. You need to create a security group, add members, and assign the appropriate permissions in Azure AD to manage access to the reports. This ensures that only authorized users can view the reports.