Power BI “Embedded” in Dynamics 365, SharePoint, and Teams
A common Power BI related request is embedding reports within other Microsoft applications. “Embedding Reports” is a simple concept; however, there are important nuances and design options for deployment. Microsoft has also muddied the waters by naming one specific technology “Power BI Embedded”. A distinction must be drawn between the product Embedded and the generic concept of embedding reports.
There are multiple meanings of “Embedded Power BI”. A precise definition of the scenario is important to achieve the desired outcome.
- Power BI Embedded Service: Microsoft sells an Azure service called “Power BI Embedded”. This service allows unauthenticated users to view a Power BI Report, commonly used to display a Power BI Report on a public website. (There is further nuance around the Embedded service vs Premium licensing, but it’s beyond the scope of this post.)
- PowerBI.com Embedded APIs: Applications can display a Report or Dashboard from PowerBI.com. When users log into the application (via Azure Active Directory), user authentication is passed invisibly to the embedded PowerBI.com content.
- PowerBI.com Embedded iFrame: In PowerBI.com, there is an “Embed” button on reports then a “Website or portal” option. The Embed button allows displaying a report anywhere an iFrame (HTML) control is available. Users may need to login a second time. For example, a user logged into Dynamics 365 must also login to PowerBI.com within the iFrame.
- PowerBI.com Embedded Deep Link: Within an application, a URL can send a user back to PowerBI.com filtered on a specific record.
- PowerBI.com Subscription Email: Embed a Power BI Report snapshot in an email via Subscriptions.
- Power Automate Action: Send a screenshot of a Power BI Report to any File destination Power BI supports.
The Embedded Service is not based on per user licensing. The service allows deployment to ISV Apps or public-facing Websites. All the other options have a prerequisite of Power BI Pro or Premium licensing.
Here’s an example of Power BI embedded into a website that anyone can view using the Power BI Embedded service. No authentication is required, and anyone can view this report on the Washington State website.
Sending users to PowerBI.com or using the Embedded API are superior options to using an iFrame. Using iFrames causes user confusion as to why they need to re-authenticate Power BI inside an App they have already logged into.
Embedded Deep Link
A URL can be generated from another App that sends filter criteria into PowerBI.com. Send Filters via the syntax below:
URL?filter=Table/Field eq ‘value‘
This URL can be generated programmatically to send a user into Power BI based on the context of the source system. For example, a user has Customer “ACME” open in Dynamics. With a Deep Link, they can be sent into PowerBI.com to review analytics for ACME.
URL?filter=Customers/CustomerName eq ‘ACME‘
Deep Links are also useful to link between two Power BI Reports.
Subscriptions will send an email screenshot of a Report and a link back to the Report. Subscriptions cannot be set to a specific bookmark, only the original published report design. For a good subscription experience, concepts such as Date ranges need to be Relative date slicers or relative DAX expressions.
Power Automate enables additional options to Export the Power BI report to a file and uses additional Flow steps to save or send the file. Power Automate will eventually support bookmarks and advanced security options. This feature requires a Premium subscription (including the new Premium Per User option).
More options are available with Power Automate versus the standard Subscription button.
The Embedded API is what most users are envisioning for retrieving a Power BI Report inside another business application. Support for applications vary; the tools are dependent on the platform development teams and how they’ve implemented the API.
Below are some key points about using the Embedded API in various Microsoft applications.
SharePoint has one of the easiest API interfaces. Add a Power BI web part and specify the URL of the Report.
A Power BI Report or App can be easily embedded as a tab in a Teams Channel.
Additionally, the entire PowerBI.com experience can be embedded into Teams as a web App.
Dynamics 365 Finance and Operations
Finance and Operations uses a few different “Embedding” options. The core technologies are covered above in this post; it’s confusing how the different components are surfaced in F&O.
F&O has “Analytical Workspaces” which fall under the category of the Power BI Embedded Service. Any user can access these Reports because Microsoft is including the service costs in the F&O licensing. However, the Embedded Service has significantly different development and deployment requirements compared to PowerBI.com. Because of the additional costs and complexity, consider Analytical Workspaces as a “built-in reporting tool”, not “free Power BI”.
The Analytical Workspace Reports can sometimes be replaced with a PowerBI.com Report, which technically is replacing the Embedded Service Report with an Embedded API Report. Keep in mind this is completely replacing the Report – the Data Model and Report Design need to be built from scratch in Power BI Desktop and published to PowerBI.com. This deployment method uses the Report location in the F&O Workspace as a placeholder for the PowerBI.com Report.
Users can Personalize their own F&O Workspaces to pull in content from PowerBI.com using the Embedded API. Dashboard Tiles and Report Links can be added to a Workspace. Power BI Personalizations require a one-time configuration of an Azure key.
Placing an Embedded API Report isn’t as simple or flexible as it is in SharePoint or Teams. Custom X++ code can be written to call the Power BI Embedded API. Custom code is required, for example, to define the PowerBI.com report location from an F&O Parameter field. Custom X++ can also send multiple contextual filters to a PowerBI.com Report when it’s displayed within F&O.
Dynamics 365 CE and Power Apps
In Model Driven Apps, users can Personalize their Dashboard experience by adding Power BI Dashboards and Tiles from PowerBI.com.
It’s possible to use the Embedded API to embed a Report, but the development process is convoluted. Embedding a Report requires direct editing of the form’s XML file – it’s not supported via the native development experience. There is an XRM Toolbox tool designed to insert the XML more easily into the form.
Note: According to the documentation, the correct XML syntax for the TileURL tag is:
However, I’ve run into issues with this syntax where the report doesn’t load. After contacting Microsoft Support, their solution was to use this XML.
Because Embedded API Reports have tricky XML editing, a lot of blogs suggest using the Embedded iFrame approach. Although this development is simpler, it will require double logins for users. iFrames also don’t support contextual filtering. Instead of iFrames, a better User Experience is to navigate to PowerBI.com, and/or use a Power BI Deep Link.
In Canvas Apps, it’s simple to embed a Dashboard Tile under Insert > Charts > Power BI tile. There’s also an undocumented hack for this visual to display a Report by specifying the TileURL parameter from the PowerBI.com Report Share > Embed settings.
Dynamics 365 Business Central
Business Central allows Embedded API reports. The Business Central Embedded API has two ways of sourcing content. First, it communicates tightly with reports located in “My Workspace” in PowerBI.com, both for retrieving Reports and uploading Reports. I would not recommend deploying Power BI Reports to “My Workspace” in most business scenarios, so I would be cautious allowing Business Central to manage Power BI content. There are better ways to deploy shared reports and shared data models.
The second method of communicating with shared reports is via a Power BI Workspace. The Business Central method of pulling Reports requires an extra step from most programs. For Business Central, shared Reports must be deployed in a Workspace where an App has been published. The Reports don’t need to belong to an App, but the existence of an App is necessary to see the Reports. The User pulling in the Reports also needs to have the App installed.
User Experience and Maintenance
Embedded BI certainly makes for an engaging demo. The User Interface of an App is more engaging when starting with a dashboard view, then jumping into a task.
Switching contexts from analysis to a task may not flow with a user’s thought process. Data is confusing when embedded analytical reports are on a refresh schedule that does not tie out to recent transactions. Therefore, Embedded reports need to be in a logical context of a business process.
Another complexity with Embedding is Report, Workspace, and App URLs sometimes change. Analytical tools are designed to constantly be updated, and those updates could break downstream embedding scenarios. If embedded Power BI is only present as a navigational shortcut, it may be beneficial long term to focus on getting users into PowerBI.com and navigate from there.
All this to say – go beyond the demo concept and examine what works best for your user base and what can be supported. Sometimes Embedding is the best answer, but many times users are happy to engage in analytical processes inside PowerBI.com.
“Embedded Power BI” has quite a few twists and turns, but it can be done! If your organization needs help deploying Power BI, please Contact Us for assistance. Dynamic Consulting is a unique partner since we are experts at all Dynamics 365 products, Power Apps, and Microsoft 365 technologies.
Joel Leichty is the Power Practice Manager at Dynamic Consulting. He also writes about Power BI in a casual style at https://joelleichty.com/.