
Community manager and producer of specialized marketing content
If your users live inside your product—not inside Power BI—embedding is the smartest way to put insights where decisions happen. Power BI Embedded lets you deliver secure, interactive dashboards and reports straight into your web application or customer portal without sending people to a separate BI tool.
This guide walks you through the essentials: architecture choices, authentication, multi-tenant security, performance tuning, cost control, and a step-by-step blueprint to go from prototype to production.
What Is Power BI Embedded (and Why Use It)?
Power BI Embedded is a Microsoft Azure service that allows you to embed Power BI reports, dashboards, and visuals into custom applications. It gives your users a fully interactive analytics experience—pan, filter, drill, export—without requiring them to log into Power BI directly.
Key benefits:
- Seamless UX: Keep users inside your app and brand the analytics experience.
- Enterprise-grade security: Enforce Row-Level Security (RLS), Object-Level Security (OLS), and SSO.
- Cost-effective at scale: Pay for capacity, not per-viewer licenses (in “app-owns-data” scenarios).
- Developer control: Use the Power BI JavaScript API for events, filters, themes, and custom UI controls.
New to the platform overall? This primer on what Power BI is and why it matters gives a solid foundation.
When to Embed: Common Scenarios
- SaaS multi-tenant analytics: Give each customer a personalized analytics area with strict data isolation (RLS).
- Customer portals: Share KPIs, usage, billing, or service status securely with clients.
- Internal apps: Add operational analytics to an intranet or line-of-business app.
- OEM and white-label solutions: Brand analytics as a native feature of your product.
Architecture in a Nutshell
At a high level, you’ll:
- Publish reports to a Power BI workspace assigned to a dedicated capacity.
- Use a backend service (with a service principal or delegated auth) to call Power BI REST APIs.
- Generate a short-lived embed token for the specific content and user context.
- Render the report in your app using the Power BI JavaScript client (powerbi-client).
Two Embedding Models: Choose Wisely
- App owns data (most common for SaaS):
- Your application manages authentication and data access.
- Users don’t need Power BI accounts.
- Requires dedicated capacity (Azure A SKUs, Premium P/EM/F SKUs).
- Best for customer-facing scenarios and multi-tenant apps.
- User owns data (internal portals):
- Each viewer authenticates with Microsoft Entra ID (formerly Azure AD).
- Users need the appropriate Power BI license (Pro or Premium per user).
- Often used for internal apps when you want to respect users’ existing Power BI permissions.
Capacity and Licensing Overview
- Azure “A SKUs” (A1–A6): Pay-as-you-go capacity in Azure, billed by the hour. You can scale up/down or pause to save costs.
- Premium P/EM SKUs (and Fabric capacities): Enterprise-grade and always-on; choose when you need guaranteed throughput, advanced features, or organization-wide distribution.
- App-owns-data requires capacity; user-owns-data requires per-user licensing unless you’re on Premium/Fabric capacity.
Authentication and Security
- Identity provider: Microsoft Entra ID (Azure AD).
- For app-owns-data: Use a service principal (application registration) with workspace access.
- For user-owns-data: Use OAuth 2.0 and the on-behalf-of (OBO) flow to delegate the user’s identity.
- Embed tokens: Always generate on the server. Never expose app secrets or tenant IDs in the browser.
- Tenant settings: Enable “Allow service principals to use Power BI APIs” and restrict which service principals can use them.
Row-Level Security (RLS) and Object-Level Security (OLS)
- Define RLS roles in your dataset; pass “effective identity” with the embed token to enforce per-tenant or per-user data filtering.
- OLS hides specific tables/columns entirely for certain roles—perfect for limiting sensitive attributes by plan or persona.
A Step-by-Step Blueprint to Embed a Report
- Prepare your content
- Build a star-schema model, enable Incremental Refresh, and define RLS roles.
- Publish your dataset and report to a workspace assigned to capacity.
- Register your application (service principal)
- In Microsoft Entra ID, create an app registration and assign Certificates/Secrets.
- In Power BI Admin portal, allow service principal to use APIs and grant it workspace access.
- Decide: app-owns-data vs user-owns-data
- For SaaS and customer portals, use app-owns-data.
- For internal apps respecting user permissions, use user-owns-data.
- Backend: Generate embed token
- Authenticate your service principal with Entra ID.
- Use Power BI REST APIs to generate an embed token for target report/dataset.
- Include effective identity with username/roles for RLS enforcement.
- Frontend: Use the Power BI JavaScript SDK
- Install powerbi-client and render the report in an iframe container.
- Listen to events like loaded, rendered, dataSelected, and pageChanged.
- Provide custom filter UI, export options, and navigation controls.
- Validate and harden
- Restrict allowed domains for embedding.
- Add a Content Security Policy (CSP) and iframe sandbox attributes.
- Monitor with the Power BI Activity Log and Azure Monitor.
- Launch and iterate
- Collect usage metrics (views, pages, filters used).
- Tune visuals, DAX, and data refresh for speed and cost.
Helpful governance patterns are covered in this deep dive on Power BI governance.
Performance and UX Best Practices
Data model and refresh
- Prefer Import mode for speed; use DirectQuery only when you need real-time and can optimize the source.
- Consider Composite Models and Aggregations to blend fast summaries with detailed drill-throughs.
- Enable Incremental Refresh to shorten refresh windows and cut capacity load.
Report design
- Limit visuals per page (8–12 is a good target). Too many visuals = slower render.
- Replace heavy slicers with dropdowns or custom filters; use bookmarks for common views.
- Use Performance Analyzer in Power BI Desktop to pinpoint slow visuals or DAX queries.
Embedding tactics
- Load only what’s visible; lazy-load other pages or tabs.
- Preload reports during low-traffic windows if your UX permits.
- Enable persistent filters to remember each user’s last state.
Capacity tuning
- Watch CPU, memory, and query waits; scale A SKUs up at peak hours and down off-peak.
- Split noisy datasets or isolate heavy refresh workloads into a separate capacity.
- Cache strategically (query caching for Import models; gateway optimizations for on-prem).
Developer productivity
- When iterating measures, leverage Power BI Copilot to explain and refine DAX.
- Use the Power BI Embedding Playground to test token scenarios and client options.
Cost Control Without Compromise
- Right-size capacity: Start with a lower A SKU and scale based on real usage.
- Schedule refresh intelligently: Refresh during off-peak; apply incremental policies.
- Pause capacity: For non-24/7 workloads, pause A SKUs overnight/weekends.
- Optimize datasets: Remove unused columns, reduce cardinality, compress text fields, and avoid calculated columns that inflate memory.
Multi-Tenant SaaS Example (RLS-Centric)
- One dataset, one report, many tenants.
- RLS role filters by TenantId column.
- Your backend passes effectiveIdentity with Username = customerId and Roles = ["TenantRole"] when generating the embed token.
- Each customer sees only their data—even at the same URL—thanks to the RLS filter enforced server-side.
Security Checklist
- Never embed with “Publish to web.” Always use embed tokens.
- Server-side only: secrets, certificates, and token creation.
- Short token TTL and rotation; monitor failed token requests.
- CSP + iframe sandbox; allowlist your app domains.
- Audit: Activity log, capacity metrics, dataset refresh logs.
- On-premises sources: Use the enterprise data gateway and restrict traffic paths.
Monitoring and Observability
- Client events: Capture load times, filter usage, and page navigation via powerbi-client events.
- REST activity: Use the Power BI Admin APIs and Activity Logs to analyze adoption.
- Capacity metrics: Track refresh time, memory pressure, and query durations to plan scaling.
Pitfalls to Avoid
- 403 Forbidden when embedding: workspace not on capacity or service principal lacks access.
- RLS not applying: no effective identity passed or role misconfigured.
- Slow pages: too many high-cardinality visuals, non-optimal DAX, or cross-filtering overload.
- Surprise costs: frequent full refreshes, large unoptimized datasets, or nonstop capacity.
What’s Next for Power BI Embedded in 2026
Expect tighter integration with Microsoft Fabric, smarter automated performance tuning, more granular governance at scale, and richer developer controls in the JavaScript API. Multi-tenant blueprinting and end-to-end lineage across data + semantic layer + app are likely to become “table stakes” by 2026.
Related Resources and Next Steps
- If you’re aligning embedded analytics with enterprise policies, start with this guide to Power BI governance.
- New to the ecosystem? Review what Power BI is and why it matters.
- Level-up your measure authoring with Power BI Copilot for DAX explanation and generation.
FAQ: Power BI Embedded
1) Do my end users need a Power BI license to view embedded content?
- App-owns-data: No. Your app authenticates via a service principal and uses capacity (A/EM/P/F SKUs).
- User-owns-data: Yes, users need Pro or Premium Per User unless you’re on a capacity that covers them.
2) What’s the difference between embed tokens and “Publish to web”?
Embed tokens are secure, short-lived, and require authentication—designed for production embedding. “Publish to web” is public and should never be used for sensitive or customer-facing scenarios.
3) How does RLS work in embedded scenarios?
Define RLS roles in the dataset and pass “effective identity” when generating the embed token (username and roles). Power BI enforces the filter on every query. This is the foundation for secure multi-tenant SaaS.
4) Can I use on-premises data with embedded reports?
Yes. Use the On-premises Data Gateway (enterprise mode). Your capacity runs the report; the gateway securely connects to on-prem sources. For DirectQuery, design your source for concurrency and predictable latency.
5) What are the main cost drivers, and how can I control them?
Capacity size and refresh/query workloads. Control costs by:
- Right-sizing capacity and scaling up only when needed.
- Using Incremental Refresh to avoid full dataset reloads.
- Pausing A SKUs during off-peak hours.
- Optimizing models to reduce memory and CPU.
6) Is Power BI Embedded suitable for a multi-tenant SaaS architecture?
Absolutely. Use a shared dataset with RLS per tenant, app-owns-data embedding, and pass effective identities with the embed token. For very large tenants, consider dedicated datasets or capacities to isolate heavy workloads.
7) Can I fully white-label the analytics experience?
Yes. Hide Power BI UI chrome, apply custom themes (JSON), control filters with your own components, and handle events via the JavaScript API. Users never need to see Power BI branding.
8) How do I monitor usage and troubleshoot issues?
- Client: Listen to events (loaded, rendered, dataSelected) and log performance timings.
- Service: Use Activity Logs and capacity metrics for refresh durations, failures, and resource pressure.
- Model: Use Performance Analyzer in Desktop and DAX Studio for deep query tuning.
9) What’s the best way to improve slow report pages?
- Reduce visuals per page and limit high-cardinality charts.
- Optimize DAX (prefer measures over calculated columns; avoid iterators where possible).
- Use Aggregations/Composite models, and ensure model relationships and column data types are clean.
- Profile gateway and data source performance for DirectQuery.
By following the practices in this guide—choosing the right embedding model, enforcing strong security, optimizing models, and monitoring capacity—you’ll deliver a fast, branded, and compliant analytics experience right inside your application.








