How to Embed Power BI Dashboard in Website
Placing an interactive Power BI dashboard directly on your website can turn static pages into dynamic data hubs. Instead of just describing your success in a blog post, you can let stakeholders filter and explore the real numbers right there. This guide walks you through the different ways to embed your Power BI reports and dashboards, from quick public sharing to secure internal portals, so you can choose the best method for your needs.
Three Methods to Embed a Power BI Dashboard
There isn't a one-size-fits-all approach to embedding your Power BI content. The right method depends entirely on your audience and the sensitivity of your data. Think of it this way: are you sharing public data with the whole world, or sensitive company metrics with just your team? Power BI offers three primary ways to do this, each with its own specific use case and security profile.
- Publish to web: A public, unauthenticated link that makes your dashboard visible to anyone on the internet.
- Embed for your organization: A secure method for sharing content internally where users must log in to view the data.
- Embed for your customers (Power BI Embedded): An advanced solution for integrating Power BI into your own applications for external users, without them needing a Power BI license.
We'll break down exactly how to use each of these, starting with the simplest method.
Method 1: Publish to Web (The Public Option)
The "Publish to web" feature is the fastest way to get your report onto a website. It generates a public link and an iframe embed code that you can paste into any HTML page. However, it comes with a major security warning: by using this method, your report and the underlying data become public.
Anyone with the link can view your report. Even worse, search engines can index it, potentially making your sensitive data discoverable through a simple Google search. Use this method only for data that you are completely comfortable being made public.
Perfect for:
- Embedding a map of public parks on a city government website.
- Showcasing non-sensitive analytical work in a personal portfolio.
- Displaying aggregated, anonymized industry trends on a blog post.
Absolutely NOT for:
- Sales figures, revenue reports, or financial data.
- Customer lists or any Personally Identifiable Information (PII).
- Any internal company metric you wouldn't post on Twitter.
How to Publish to Web
Once you've decided this is the right approach, generating the embed code only takes a few clicks directly from the Power BI service.
- Open Your Report: Navigate to the report you want to embed in your Power BI workspace. Make sure it's the report, not the dashboard.
- Generate Embed Code: From the top menu, go to File > Embed report > Publish to web (public).
- Confirm Your Intent: Power BI will show you a prominent warning about making your data public. Read it carefully. If you are certain, click "Create embed code" and then "Publish."
- Copy the Code: You will be presented with a window containing two options. The first is a direct link, and the second is the HTML code you need for your website, which looks like an iframe. Copy the HTML code.
<iframe title="Your Report Name" width="800" height="600" src="https://app.powerbi.com/view?r=ey..." frameborder="0" allowFullScreen="true"></iframe>- Paste it into Your Website: Open the HTML editor of your target webpage or blog post and paste the iframe code where you want the report to appear. You can adjust the
widthandheightattributes to fit your page design.
Your report is now live and public. You can manage all your public embed codes from the Power BI settings menu (Settings > Manage embed codes) if you ever need to revoke access and delete one.
Method 2: Embed for Your Organization (The Secure Internal Option)
If you need to share reports securely inside your company, this is the method you need. "Embed for your organization," often called "secure embed," generates an embed code that requires users to sign in with their organizational Power BI account to view the content. All existing permissions and row-level security (RLS) rules are fully respected.
This approach ensures that only authorized colleagues can see the data. If a user doesn't have permissions to view the report in Power BI, they won't be able to see it on the embedded page either.
Perfect for:
- Embedding a sales team dashboard on an internal SharePoint page.
- Placing a project status report on a company wiki like Confluence.
- Integrating marketing campaign results into a logged-in area on your business's website.
How to Securely Embed for Your Organization
The process is similar to the public option but starts from a different menu.
- Open Your Report: Navigate to the desired report in your Power BI workspace.
- Find the Secure Embed Option: Go to File > Embed report > SharePoint Online. Don't worry if you aren't using SharePoint, this link works for any internal website.
- Copy the Embed URL: You will get a URL. This isn't the final iframe code, but just the source link for embed. Copy this link.
https://app.powerbi.com/reportEmbed?reportId=...- Construct Your Iframe Manually: You'll need to put that URL into a standard HTML iframe tag yourself. It looks like this:
<iframe title="Sales Performance Q3" width="800" height="600" src="PASTE_YOUR_URL_HERE" frameborder="0" allowFullScreen="true"></iframe>- Paste It Into Your Internal Page: Place this iframe into the HTML of your secure internal website. When a team member visits, they'll see a Microsoft sign-in prompt if they aren't already authenticated. Once logged in, the report will load according to their specific permissions.
Method 3: Embed for Your Customers (The Advanced Application Option)
What if you want to embed analytics into your own application for external clients to use? Maybe you run a SaaS platform and want to provide a customer-facing reporting dashboard. Your customers probably don't have Power BI licenses, but they still need to see their own data securely.
This is where Power BI Embedded comes in. It is a premium, developer-centric solution where your application authenticates to Power BI, not your end-users. This is known as the "app owns data" model.
It's the most powerful and seamless method, but it's also the most complex and costly to set up. It requires developer expertise and a Power BI Embedded or Power BI Premium capacity purchased through Microsoft Azure.
High-Level Overview of the Process
Setting this up is a multi-step process involving Azure and a developer writing code, but here is a simple overview of what it takes:
- Purchase Capacity: You must purchase Power BI Embedded capacity (A SKUs) or Power BI Premium capacity (P or EM SKUs) in the Azure portal. This is a dedicated computational resource billed hourly.
- Register an Azure AD Application: Your developer registers your application in Azure Active Directory (Azure AD). This creates a service principal, which is like a user identity for your app, allowing it to authenticate with Power BI's APIs.
- Grant Permissions: You grant the newly created service principal the necessary permissions to your Power BI workspaces and datasets.
- Generate Embed Tokens: When an end-user navigates to your application's reporting page, your server-side code authenticates the service principal and generates a temporary, secure "embed token" from the Power BI REST API. This token defines exactly what that specific user is allowed to see (for example, applying row-level security so a customer only sees their own data).
- Render with the Client SDK: Your server passes that embed token to the front-end (the user's web browser). There, a JavaScript library - the Power BI Client SDK - uses the token to securely render the report inside a
<div>on your page.
This method gives you complete control over the user experience and security, making it perfect for ISVs (Independent Software Vendors) and companies providing data as a service. However, the technical barriers and costs put it out of reach for simple website embeds.
Tips for an Optimized Embedding Experience
Simply embedding a dashboard is only half the battle. A poorly designed report can be slow to load and confusing to use. Keep these best practices in mind.
1. Design for Responsiveness
Your website visitors could be on anything from a huge monitor to a small smartphone. Use Power BI’s "Mobile layout" view to create a version of your report optimized for smaller screens. Consider the size of the containing element on your web page and ensure your fonts, charts, and slicers are legible and easy to interact with inside that space.
2. Optimize for Performance
An embedded report that takes 30 seconds to load might as well be broken. Follow performance best practices before you embed:
- Keep your data model clean and simple.
- Minimize the number of visuals on a single report page. Fewer, more focused visuals load faster.
- Avoid complex DAX measures whenever possible.
- Use pre-set filters to limit the amount of data being loaded initially.
3. Provide Context
Don't just drop a complex dashboard onto a webpage without any explanation. Add text blocks near the embedded report to explain what the user is seeing. You can guide them with questions like, "Use the filter on the right to see performance by region," or provide a clear heading that summarizes the report's main goal.
Final Thoughts
Embedding Power BI dashboards transforms how you share data, moving away from static screenshots and toward interactive exploration. By understanding the key differences between publishing publicly, embedding securely for your team, and developing customer-facing analytics with Power BI Embedded, you can choose the right path for your audience and data sensitivity.
This process of setting up, managing, and embedding BI reports can often feel complex. If your goal is to simply connect your sales and marketing data sources - like Shopify, Google Analytics, or Salesforce - and create shareable, always-on dashboards without jumping through technical hoops, these traditional tools can be overkill. In these moments, using an AI-native tool does the heavy lifting for you. For instance, with Graphed , we let you build powerful, real-time dashboards just by describing what you want to see in plain English. This lets you and your team get straight to answers instead of spending time configuring BI tools.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.