Power BI usage scenarios: Embed for your organization

Note

This article forms part of the Power BI implementation planning series of articles. This series focuses primarily on the Power BI workload within Microsoft Fabric. For an introduction to the series, see Power BI implementation planning.

This usage scenario focuses on how a developer can programmatically embed Power BI content in a custom application for your organization. (The developer isn't necessarily responsible for creating the Power BI content.) The Embed for your organization scenario applies when the application audience comprises users who have permission and appropriate licenses to access Power BI content in the organization. These users must have organizational accounts (including guest accounts), which authenticate with Microsoft Entra ID (previously known as Azure Active Directory).

Note

In this scenario, Power BI is software-as-a-service (SaaS). The embedding scenario is sometimes referred to as User owns data.

Scenario diagram

The following diagram depicts a high-level overview of the most common user actions and Power BI components that support embedding for your organization.

Diagram shows embedding for your organization, which is about integrating content into internal applications. Items in the diagram are described in the following table.

Tip

We encourage you to download the scenario diagram if you'd like to embed it in your presentation, documentation, or blog post—or print it out as a wall poster. Because it's a Scalable Vector Graphics (SVG) image, you can scale it up or down without any loss of quality.

The above diagram depicts the following user actions, tools, and features:

Item Description
Item 1. The Power BI content creator develops a BI solution by using Power BI Desktop.
Item 2. When ready, the content creator publishes the Power BI Desktop file (.pbix) or Power BI project file (.pbip) to the Power BI service.
Item 3. Some data sources may require an On-premises data gateway or VNet gateway for data refresh, like those that reside within a private organizational network.
Item 4. A Power BI workspace contains Power BI items ready for embedding. For non-personal workspaces, users of the custom application have permission to view (or create or modify) Power BI content because they belong to a workspace role or they have direction permissions.
Item 5. The custom application prompts the app user to authenticate with Microsoft Entra ID. When authentication succeeds, the custom application caches a Microsoft Entra access token.
Item 6. The custom application uses the Microsoft Entra access token to make Power BI REST API calls on behalf of the app user. Specifically, the application uses the access token to retrieve metadata about workspace items. Metadata includes properties required to embed content in the custom application.
Item 7. The custom application embeds a specific Power BI item in an iframe HTML element. The application can support the creation and editing of Power BI reports, providing the user has permission to do so.
Item 8. Power BI administrators oversee and monitor activity in the Power BI service.

Key points

The following are some key points to emphasize about programmatically embed Power BI content in a custom application for your organization.

Use cases

There are several reasons why you might embed Power BI content for your organization.

  • Internal business intelligence portal: You might want to create an internal business intelligence (BI) portal as a replacement for the Power BI service. That way, you can create a custom application that integrates content from Power BI and other BI tools.
  • Internal app: You might want to develop an intranet app that shows data visualizations. For example, an intranet site for a manufacturing department could show real-time visuals that provide up-to-date information about the production line.
  • Customized logging: You might want to log custom events to record Power BI content access and use, beyond what the activity log records.

Tip

If you're looking to create a BI portal styled for your organization, you might be able to achieve that by simply adding custom branding to the Power BI service.

No-code embedding

Developing a programmatic solution requires skill, time, and effort. Consider that there are embedding techniques known as no-code embedding that non-developers can use to embed content in a simple internal portal or website.

These techniques require that report consumers belong to the organization, be authenticated, and have permission to access the reports. Power BI ensures that all permissions and data security are enforced when consumers view the reports. Sometimes, users might be challenged to authenticate by signing in to Power BI.

Embeddable content

When embedding for your organization, you can embed the following Power BI content types:

  • Power BI reports
  • Specific Power BI report visuals
  • Paginated reports
  • Q&A experience
  • Dashboards
  • Specific dashboard tiles

There's no limitation on where the content resides. The content could reside in a personal workspace or a regular workspace. What matters is that the app user has permission to view (or create or edit) the content. For example, it's possible to embed content from the app user's personal workspace.

Any content the user can see in the Power BI service can be embedded in a custom application. If the user has permission to create or edit content, it's possible for a custom app to support that functionality (for Power BI reports only).

Authentication

The authentication flow is interactive authentication with Microsoft Entra ID. Interactive authentication means that the app user will be challenged to authenticate. When authenticated, Microsoft Entra ID returns an access token. It's the responsibility of the custom application to cache the access token so that it can be used to make Power BI REST API calls and to embed content inside an iframe HTML element. Those calls can retrieve metadata about Power BI content on behalf of the app user, including the properties required to embed it in the custom application.

Licensing

There's no specific licensing requirement to embed for your organization. What matters is that the app user has permission and an appropriate Power BI license to view (or create or edit) the content. It's even possible to embed content from a personal workspace when the app user only has a Fabric (free) license.

Power BI client APIs

The Power BI client APIs allow a developer to achieve tight integration between the custom application and the Power BI content. They develop the application by writing custom logic with JavaScript or TypeScript that runs in the browser.

The application can set up and automate operations, and it can respond to user-initiated actions. Additionally, you can integrate Power BI capabilities, including navigation, filters and slicers, menu operations, layout, and bookmarks.

Tip

The Power BI Embedded Analytics Playground is a website that helps you learn, explore, and experiment with Power BI embedded analytics. It includes a developer sandbox for hands-on experiences that use the client APIs with sample Power BI content or your own content. Code snippets and showcases are available for you to explore, too.

For more information, see What is the Power BI embedded analytics playground?

Gateway setup

Typically, a data gateway is required when accessing data sources that reside within the private organizational network or a virtual network. The two purposes of a gateway are to refresh imported data, or view a report that queries a live connection or DirectQuery semantic model (previously known as a dataset).

Note

A centralized data gateway in standard mode is strongly recommended over gateways in personal mode. In standard mode, the data gateway supports live connection and DirectQuery operations (in addition to scheduled data refresh operations).

System oversight

The activity log records user activities that occur in the Power BI service. Power BI administrators can use the activity log data that's collected to perform auditing to help them understand usage patterns and adoption. Logged events will describe the consumption method as Embedding for your organization. There's presently no way to determine whether content was viewed in a no-code embedding experience in a custom application.

To learn more about Power BI embedded analytics, work through the Embed Power BI analytics learning path.

You can also work through the Power BI Developer in a Day course. It includes a self-study kit that guides you through the process of developing an ASP.NET Core MVC app.

For other useful scenarios to help you with Power BI implementation decisions, see the Power BI usage scenarios article.