DEV Community

Cover image for How to Publish and Embed Your First Power BI Report on a Website: For Beginners
Gracemunyi
Gracemunyi

Posted on

How to Publish and Embed Your First Power BI Report on a Website: For Beginners

My next update is a simplified guide to publishing a Power BI report on the Web. I will walk you through every step from creating your first workspace to embedding a live interactive report on any website using an iframe.

This guide is written for a complete beginner. I assume you have never published a Power BI report before and may not even know what a workspace is yet. Every term and step will be explained in detail with a screenshot.

By the end of this article you will know how to:

  • Understand what Power BI is and what you need before starting
  • Create a workspace in the Power BI Service
  • Upload and publish your report to the cloud
  • Generate an embed code from Power BI
  • Paste that embed code into any website using an HTML <iframe>

Table of Contents

  1. What is Power BI?
  2. What You Need Before You Start
  3. Step 1 — Sign In to the Power BI Service
  4. Step 2 — Create a Workspace
  5. Step 3 — Upload and Publish Your Report
  6. Step 4 — Embed the Report on Your Website and Generate the Embed Code
  7. Step 4 — Make it Responsive
  8. Step 6 — Delete or Revoke an Embed Code
  9. Key Takeaways

What is Power BI?

Power BI is a data visualization tool owned by Microsoft that allows you to connect and extract data from various data sources such as databases, excel, web etc., in order to clean and transform the data then analyze it using interactive charts, graphs, and dashboards.. This is to answer the necessary business questions/goals. People can click, filter, and explore the dashboard live.

The dashboards can then be:

  • Shared privately among organization employees
  • Published publicly on the internet
  • Embedded directly into a website: which is what this guide is covering.

The two parts of Power BI you must know

Power BI has two parts: Power Bi the desktop App and Power BI Service

Part What it is What you use it for
Power BI Desktop A free Windows app you download and install in your laptop Building and designing your report
Power BI Service A website at app.powerbi.com Publishing, sharing, and embedding your report

What is a .pbix file in Power BI?

You must always save the data work you have been working on in Power BI Desktop. The data file saved will be in a format called *.pbix". Just like a saved Excel file format is ** .xlsx"". This is the file you upload to the cloud or share. If a colleague sends you a Power BI report by email it will almost always be a .pbix file e.g sales-report.pbix.

Steps to build a simple practice .pbix file

Open Power BI Desktop → click Enter data → load some data e.g from excel → click Load → click the bar chart icon on the right > create some visualizations → go to File → Save as → save it as Your_name_practice_report.pbix.

That is enough as an upload file to get you started on the uploading process.


What You Need Before You Start

Before starting the upload process, make sure you have all of these ready:

Requirement Why you need it Where to get it
Power BI Desktop To build and save your reports Download free from Microsoft
Microsoft work or school account Personal Gmail or Outlook accounts cannot publish reports Provided by your employer or school
Power BI Pro license Required to publish to workspaces and share reports Included in many Microsoft 365 plans, or activate a free 60-day trial
A .pbix report file The report you want to publish Built in Power BI Desktop

Step 1 : Sign In to the Power BI Service

The Power BI Service is the cloud website where publishing and embedding happens. You cannot design the reports here. Its only used for managing and sharing them with a larger audience team without requiring them to also download the Power Bi Desktop App.

How to sign in

  1. Open your web browser
  2. Go to https://app.powerbi.com
  3. Click Sign in
  4. Enter your work or school Microsoft email address — for example yourname@yourcompany.com
  5. Enter your password and complete any two-factor authentication your organization requires.

Getting an error on sign-in? Make sure you are using a work or school account, not a personal Microsoft account. If your company uses Single Sign-On (SSO), you may be redirected to your company login page first — that is normal.

Once signed in you will land on the Home screen. On the left side you will see a vertical sidebar with icons labelled Home, Create, Browse, and Workspaces.

Home page

Step 2: Create a Workspace

What is a workspace?

A workspace is a folder in the Power BI cloud where your reports, datasets, and dashboards live. It is where you organize and share your work.

By default Power BI gives every user a personal area called My workspace. However, Reports stored in "My workspace" cannot be embedded on a website. Thus, you must publish your report to a proper named workspaces for embedding to work.

My workspace A named workspace
Who can see it Only you You and anyone you invite
Can embed reports No Yes
Can share with others No Yes
Requires Pro license No Yes

Steps to create the Workspace

1. In the left sidebar, click the Workspaces icon. Workspaces appear right above my Workspace as shown in the screenshot below

A panel will slide out showing any existing workspaces.

2. At the bottom of the panel, click + New workspace

Image 2

3. A settings panel will open on the right side of your screen. Fill in the following fields:

  • Workspace name eg. your name, or project description like Sales Reports 2026 or Marketing Dashboard
  • Leave all other settings at their defaults for now.

4. Click Save

View of Workspacesin PowerBi Service

Your new workspace now appears in the left sidebar under Workspaces. Click on it to open it — it will be empty, but the next step fixes that.


Step 3 : Upload and Publish Your Report

Publish from Power BI Desktop to the web service (Most Recommended) as it is thefastest approach

1. Open your report in Power BI Desktop
2. Sign in to Power Bi. Click Sign In in the top right corner and enter the same email and password you use for the Power BI Service.

2. Click the Home tab in the ribbon at the top of the screen. Make sure you are on the Home tab and not on another tab like Insert or View.

3. Click the Publish button on the far right side of the Home ribbon.

Power BI Desktop application showing the Home tab and Publish button on the far right side highlighted in red box

4. A dialog box will appear titled "Publish to Power BI" asking you to select a destination

5. Click on the workspace you just created : e.g Your name or Sales Reports 2026

Choose your named workspace from the list. The report will be published there and will be ready for embedding.

Please remember: Do not select My workspace. If you publish to My workspace the report cannot be embedded. Always choose your named workspace.

6. Click Select

7. Power BI Desktop will show a progress bar, then a green tick with the message "Success!"

8. You can click Open your-report-name in Power BI in the success dialog to jump straight to the report in your browser, or close the dialog and continue with this guide.

9. Confirm the report is there by refreshing Power Bi Service then Click my workspaces. The uploaded report will appear.

Workspace name i created

Successful upload

Step 4 : Embedding the report on a website.

Power BI can generate a piece of HTML code called an iframe that you paste into your website's code. This tells the browser to fetch and display the live Sales Reports 2026report, allowing anyone who visits your website to view and interact with the report.

Power BI offers several ways to embed a report. Here is what each one means:

Option Who can view it Best used for
Publish to web (public) Anyone on the internet, no login required Public websites, blogs, news articles
Embed for your organization Only people signed in with your company account Internal tools, company intranets
SharePoint Online People with access to your SharePoint site SharePoint intranet pages
Website or portal (secure) Users authenticated via your app Custom web applications

For this guide we will use Publish to web (public): the simplest and the right choice when learning.

Please Note: "Publish to web" makes your report visible to every person on the internet with no password and no login. Never use this with real business data, financial figures, personal information, or anything confidential.

Generate the Embed Code called an iframe

1. Make sure your report is open in the Power BI Service. If it is not, go to your workspace and click on the report name to open it.

2. Click File (top-left area of the report look for the menu bar).

3. In the dropdown, Hover over Embed report and a sub menu will appear to the right

4. Click Publish to web (public)

A dialogue box will appear with a warning, explaining that the report will be visible to anyone on the internet. Read it carefully.

5. Then click Create embed code

Step 5: Making the Embed Responsive

If a dialog pops up requesting you to contact the admin for access to enable publishing, close the dialog box then repeat 1,2 and 3.

4. Click Website or Portal

Dialogue Box

5. Copy the Iframe link that appears under HTML to paste on a website box

6. Go to your PC Desktop and Create a Folder. Name it Deploying or Publishing

7. Open your Visual Studio code App to the Welcome page

8 Click Open Folder and select the Publishing folder you created.

9 Once inside the folder, Navigate to the left side where the name Publishing appears, then Click New Open File

10 Name it ** Sample.html** or Index.html

VS Code File Creation

11 Open the Index.html file

12 Go to W3Schools on your browser W3Schools HTML Tutorial and open it

13 Copy the whole code listed under Example

W3School HTML

14 Paste it in the VS Code file you created named index.html and Save it by Clicking Ctrl + S

15 Go to the publishing folder that you created in your PC. An Explorer file called Index should be appear.
16 Double click it. It will open in your browser. Copy the URL that appears. Format is
file:///C:/User/User/Desktop/Publishing/Index.html

Index URL

17 Open a new Tab on your browser and paste the URL. Then click Enter. . Our goal is to replace the This is a paragraph text with your actual Power BI Sales Report 2026*.

18 GO BACK to your Visual Studio Text editor you named Index.html. Then Delete line 9 of the W3School code that you paste there.ie <p>This is a paragraph.</p>

20 Under line 9, Paste the HTML iframe code you had copied in POINT 5

21 Save the Changes by clicking CTRL+S

Iframe HTML code Saving

22 Go back to your browser from point 17 and refresh. Your Power BI Report should be loading.

24 Click Sign In and log in using your Power BI Service log in details as you have not yet given public access to your Power BI report.

Web sign in

25 Report will then load shortly. Below should be the type of view that you get.

Embedded Power BI report

STEP 6 You can Delete or Revoke an Embed Code

You can take a report offline at any time. Once you delete an embed code the report immediately stops showing on every website that uses it — no need to edit any HTML.

Steps to revoke an embed code:

  1. Open the report in the Power BI Service
  2. Click File in the top-left menu bar
  3. Hover over Embed report
  4. Click Publish to web (public)
  5. In the dialog that appears, click "Manage embed codes"
  6. A list of all embed codes you have ever created will appear
  7. Find the one you want to remove and click the delete icon (trash can) on the right
  8. Confirm the deletion

Key Takeaways

# Key point
1 Power BI Desktop is for building reports. Power BI Service at app.powerbi.com is for publishing and embedding them.
2 You can publish Power BI reports in the web for easier accessibility to a wider audience.
3 You must publish to a named workspace, not My workspace, for embedding to work.
4 Use Publish from Power BI Desktop, or Upload in the browser, to get your .pbix file into the cloud.
5 Generate your iframe code via File → Embed report → Publish to web (public) or ** Website & Publish**.
6 Publishing to web (public) means anyone on the internet can access it without any login required
7 Never embed real or sensitive data/reports like company reports using Publish to web. Tt is visible to the entire internet with no password. Always publish as Embed for your organization, meaning only people signed in with your company account
8 You can revoke any embed code at any time from the Manage embed codes screen, which immediately takes the report offline everywhere it was embedded.
THE END

Top comments (0)