How to Include In-App Power BI

Cody Schneider8 min read

Adding rich, interactive business intelligence directly into your own app, website, or customer portal is a powerful way to deliver value. Instead of forcing users to jump to another platform to see their data, you can seamlessly provide analytics right where they work. This article breaks down how to use Power BI Embedded to bring your data to life inside your application, covering the key models and steps to get you started.

What Exactly is In-App Power BI?

In-app Power BI, officially known as Power BI Embedded, is an Azure service that lets developers embed Power BI visuals, reports, and dashboards directly into an application. This isn't just a static screenshot, it's a fully interactive experience. Users can filter, slice, and drill down into the data just as they would in the standard Power BI service, but without ever leaving your platform.

Why would you do this? The benefits are significant:

  • Create a Seamless User Experience: Keep users engaged within your ecosystem. Providing analytics in context removes friction and makes your application the single source of truth.
  • Increase Application 'Stickiness': When your app becomes essential for not just workflows but also for insights, users have more reasons to log in and stay.
  • Monetize Your Data: For SaaS companies, offering premium analytics or a reporting module can become a new revenue stream.
  • Maintain Brand Consistency: You can completely "white-label" the embedded analytics, controlling the look and feel to match your application’s UI. Your users won't even need to know it's Power BI under the hood.

Choosing the Right Embedding Model

Before you start writing any code, the most critical decision is choosing your embedding model. This choice determines how your users will authenticate and access the reports. Power BI offers two primary methods: "Embed for Your Customers" and "Embed for Your Organization."

1. Embed for Your Customers (App Owns Data)

This is the model most commonly used by Independent Software Vendors (ISVs) or businesses building customer-facing applications. In this scenario, your application authenticates with Power BI, not your end-users. Your users don't need a Power BI license or account to view the reports within your app.

  • Who it's for: External users, such as customers of your SaaS product or clients accessing a portal
  • How it works: Your application backend uses a master user account, service principal, or service account to connect securely to Power BI. It gets an embed token from Power BI and passes that token to the user’s web browser to render the report. Think of it as your app having a 'master key' to view the data, which it then uses to securely show specific data to each logged-in user.
  • Example: A marketing analytics SaaS platform provides a dashboard for each of its customers to track their campaign performance. Customers log into the SaaS platform, which then uses the "App Owns Data" model to display a personalized Power BI report.

2. Embed for Your Organization (User Owns Data)

This model is designed for internal applications, where all of your users are part of your organization and already have a Power BI account.

  • Who it's for: Internal users, like employees, who have access to your organization’s Power BI workspace
  • How it works: Each user signs into the application using their own organizational credentials (like their Microsoft 365 login). The application then leverages these credentials to display Power BI content that the user already has permission to see. This model enforces all Power BI permissions and roles automatically.
  • Example: A large company builds an internal sales portal. When a sales manager logs in, they see an embedded Power BI dashboard showing their team's performance, authenticated with their own company account.

For most external-facing applications, Embed for Your Customers (App Owns Data) is the right path. The rest of this guide will focus on that scenario.

A Step-by-Step Guide to Get Started

Embedding Power BI analytics is a multi-step process that involves preparing your report, configuring your Azure environment, and integrating the client-side code into your application. Here’s a high-level overview of the key phases.

Step 1: Get Your Power BI Content Ready

Before you can embed anything, you need something to embed. This part happens in Power BI Desktop and the Power BI service.

  1. Build Your Report: Create your report in Power BI Desktop just as you normally would. Connect to your data sources, build your data model, and design your visuals.
  2. Publish to a Workspace: Publish the report to a dedicated app workspace in the Power BI service. It's best practice to create a new workspace specifically for your embedded content rather than using "My Workspace."

Step 2: Set Up Your Embedding Environment in Azure

This is where you authorize your application to access the Power BI APIs. It's the most technical setup step.

  1. Register an Application in Azure AD: This is the identity of your application. You'll need to go to your Azure Active Directory, create a new "App registration," and give it a name. This process will generate an Application (client) ID, which you'll need later.
  2. Create a Client Secret: Within your new app registration, you must create a client secret, which acts as a password for your application. Copy this secret and store it securely immediately as a secret is usually only displayed once.
  3. Grant Permissions: In your Power BI Admin portal (under Tenant settings), enable the service principal API access and grant a security group (which your Azure app is a part of) access to Power BI. This crucial step allows your application to "talk" to Power BI on behalf of your users.

Step 3: Choose Your Capacity

To use the "Embed for Your Customers" model in a production environment, you need dedicated capacity. This ensures performance and availability for your users without requiring them to have individual Power BI Pro licenses. You have two main options:

  • Power BI Premium (P SKUs): These are larger capacity nodes suitable for enterprise-wide BI and big data workloads. They are a good fit if your company uses Power BI extensively internally and also needs to embed.
  • Power BI Embedded (A SKUs): These are Azure-specific SKUs designed solely for embedding. They are often more cost-effective if your only goal is to embed content in your app. You can scale them up or down and even pause them to save costs, making them very flexible.

Step 4: The Fun Part - Embedding with the API

With the setup complete, you can now embed the report into your application's front-end. This is typically done using the Power BI JavaScript client library.

The general workflow is:

  1. Your user logs into your web application.
  2. Your back-end server authenticates with Azure AD using your client ID and client secret to get an access token.
  3. Your back-end server then uses that access token to talk to the Power BI REST API and requests an embed token for the specific report the user needs to see. This token is what grants the user a temporary, secure key to view the report.
  4. Your back-end passes the embed token, the report ID, and the embed URL to the front-end.
  5. The Power BI JavaScript library on your front-end uses this information to render the report inside a designated container (e.g., a <div> element).

Here's a simplified example of what the JavaScript configuration object might look like:

let config = { type: 'report', tokenType: models.TokenType.Embed, accessToken: yourGeneratedEmbedToken, embedUrl: yourReportEmbedUrl, id: yourReportId, permissions: models.Permissions.All, settings: { filterPaneEnabled: true, navContentPaneEnabled: true } }, // Get a reference to the container HTML element let reportContainer = document.getElementById('reportContainer'), // Embed the report and display it let report = powerbi.embed(reportContainer, config),

Best Practices for a Great User Experience

Just getting the report to show up is only half the battle. To make it feel truly native to your application, consider these tips:

  • Optimize for Performance: Embedded reports need to load quickly. Use efficient data models, apply filters in your query to load less data, and consider pre-filtering an embedded report based on the user's context.
  • Implement Row-Level Security (RLS): Never show one customer's data to another. With RLS, you can use a single report but define rules that filter the data dynamically based on the user, a customer from Company A can only see data for Company A.
  • Create a Seamless Design: Use Power BI's theming capabilities to match the colors, fonts, and style of your application. You can hide the Power BI chrome, like the filter pane, and build your own custom filter controls within your app’s UI for a completely integrated feel.
  • Leverage Interactive Features: The API gives you an enormous amount of control. You can programmatically apply filters, bookmark specific views, or even create event listeners that allow your main application and the embedded report to communicate with each other.

Final Thoughts

Embedding Power BI into your application is a fantastic way to deliver powerful, interactive analytics where your users already are. By understanding the core embedding models, following the setup process, and focusing on user experience, you can turn your application into an indispensable hub for data-driven insights.

While embedding major BI tools offers deep customization, it often requires significant developer time, Azure management, and a deep understanding of complex data systems to get it right. This is a challenge we've thought a lot about. Instead of forcing your team to become BI experts or spend sprints on integration, at Graphed we built a system that lets anyone create and share powerful analytics using simple, natural language. Our focus is on eliminating the steep learning curves and technical overhead, so your team can go from a question to an interactive, real-time dashboard in seconds, not weeks.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.