Embed Power BI analytics

Advanced
Developer
Business Analyst
Microsoft Power Platform
Power BI

Learn how to programmatically embed Power BI content by using the Power BI REST API and the Power BI client APIs, enforce row-level security (RLS) for embedded content, automate common Power BI setup tasks, configure a development environment, and determine appropriate licensing.

Prerequisites

You should be an experienced app developer. It's an advantage if you have development experience with .NET, Visual C#, HTML, and JavaScript. Familiarity with Power BI is beneficial, but not essential.

Modules in this learning path

Developers can programmatically embed Power BI analytics items in their apps to present data as in-context visualizations. Users can then make decisions based on facts instead of opinions.

Any type of Microsoft Power BI content can be embedded into an app: Power BI reports, Power BI report visuals, paginated reports, dashboards, specific dashboard tiles, and even the Q&A natural language experience.

Moreover, real-time Power BI content will show up-to-date results in an embedding app. Developers can integrate content with the app in many different ways to provide a seamless experience. They can even brand Power BI as their own.

Usually, embedding requires a programmatic solution, but this module also describes no-code embedding approaches that could be suited to simpler requirements.

Tip

Power BI is in a constant state of evolution, so be sure that you keep abreast of new features that are announced in the Microsoft Power BI Blog. You might discover new features and capabilities that you can apply to improve your existing reports.

Programmatic embedding of Power BI analytics always involves the selection and purchase of a product. The product can be Microsoft Power BI Premium or Microsoft Power BI Embedded. To make the right selection, you first need to determine whether the embedding scenario is for internal or external users.

You should also consider the size of the product SKU, which determines Power BI capacity compute resources and memory. It's important that you size capacities to ensure reliability and performance, yet not overspend. Occasionally, you might also need to ensure that capacities will resize in response to sudden increases in demand for capacity resources.

Tip

Power BI is in a constant state of evolution, so be sure that you keep abreast of new features that are announced in the Microsoft Power BI Blog. You might discover new features and capabilities that you can apply to embed Power BI content in your apps.

To start developing your app that embeds Power BI content, you should first know whether it's for internal or external users. When it's for internal users, your app must use the For your organization scenario, so it will use an interactive authentication flow. When it's for external users, your app must use the For your customers scenario, so it will use a non-interactive authentication flow.

Your setup will involve creating an Azure AD app registration to establish an identity for your app. It allows your app to authenticate and acquire access tokens, which are necessary to embed Power BI content.

Note

Power BI is in a constant state of evolution, so be sure that you keep abreast of new features we announce in the Microsoft Power BI blog. You might discover new features and capabilities that you can apply to improve your existing reports.

You can embed any type of Power BI content in your apps. Including Power BI reports, report visuals, paginated reports, dashboards, dashboard tiles, and the Q&A experience. Your app can edit existing Power BI reports or create new ones, too.

Embedding Power BI content is always a client-side process. To assist your development effort, you can import client libraries that provide programmatic control of the entire embedding experience. You can also optimize the embedding experience by using bootstrap or phased embedding.

Tip

Power BI is in a constant state of evolution, so be sure that you keep abreast of new features that are announced in the Microsoft Power BI Blog. You might discover new features and capabilities that you can apply to improve your existing reports.

Embedding Power BI content is only a first step because more potential exists. Power BI client APIs help you achieve tight integration between the app and the content. The app can set up and automate operations, and it can respond to user-initiated actions. Additionally, you can integrate Power BI capabilities, including navigation, writing, filters and slicers, menu operations, layout, and bookmarks.

Tip

Power BI is in a constant state of evolution. Be sure to keep abreast of new features that are announced in the Microsoft Power BI Blog. You might discover new features and capabilities that you can apply to improve your existing reports.

When your app users should only have access to view a subset of data, you need to develop a solution that restricts access to Power BI dataset data. The reason might be because some users aren't permitted to view specific data, such as sales results of other sales regions. Achieving this requirement commonly involves setting up row-level security (RLS), which involves defining roles and rules that filter model data.

When using the For your organization scenario, the data model and dataset developers must enforce RLS and ensure that internal users are mapped to security roles.

When you're using the For your customers scenario, your app must set the effective identity to restrict access to data. This effective identity determines how Power BI will connect to the model and how it will enforce RLS security roles. How you set up the effective identity depends on the type of Power BI dataset.

Tip

Power BI is in a constant state of evolution, so be sure that you keep abreast of new features that are announced in the Microsoft Power BI Blog. You might discover new features and capabilities that you can apply to improve your existing reports.

After you've developed your app with embedded Power BI analytics, a final consideration might be to automate the management of your solution. Automation can result in faster and more accurate solution management. Three libraries are available for you to use to develop an automation solution.

When you're designing a multi-tenancy app, we recommend that you use workspace separation as the embedded analytics multi-tenancy solution. Automating the introduction of new tenants (customers) will ensure fast and accurate setup.

Tip

Power BI is in a constant state of evolution, so be sure that you keep abreast of new features that are announced in the Microsoft Power BI Blog. You might discover new features and capabilities that you can apply to improve your existing reports.