Embed a Power BI Report Server report using an iFrame in SharePoint Server

In this article, you learn how to embed a Power BI Report Server report by using an iFrame in a SharePoint page. If you're working with SharePoint Online, Power BI Report Server must be publicly accessible. In SharePoint Online, the Power BI Web part that works with the Power BI service won't work with Power BI Report Server.

iFrame sample

Prerequisites

Create the Power BI report URL

  1. Download the sample from GitHub: Blog Demo. Select Clone or download, and then select Download ZIP.

    Download sample PBIX file

  2. Unzip the file, and open the sample .pbix file in Power BI Desktop for Power BI Report Server.

    PBI RS Desktop tool

  3. Save the report to the Power BI Report Server.

    PBI RS Save

  4. View report in the Power BI Report Server web portal.

    Web portal

Capture the URL parameter

After you have your URL, you can create an iFrame within a SharePoint page to host the report. For any Power BI Report Server report URL, add the following query string parameter to embed your report in a SharePoint iFrame: ?rs:embed=true.

For example: https://myserver/reports/powerbi/Sales?rs:embed=true

Embed the report in a SharePoint iFrame

  1. Navigate to a SharePoint Site Contents page.

    Site Contents page

  2. Choose the page where you want to add your report.

    Site Contents page app

  3. Select the gear icon on the top right, and then select Edit page.

    Edit page option

  4. Select Add a Web Part.

  5. Under Categories, select Media and Content. Under Parts, select Content Editor, and then select Add.

    Select Content Editor Web Part

  6. Select Click here to add new content.

  7. From the top menu, select Format Text, and then select Edit Source.

    Edit Source

  8. In the Edit Source window, paste your iFrame code in HTML Source, and then select OK.

    iFrame code

    For example:

    <iframe width="800" height="600" src="https://myserver/reports/powerbi/Sales?rs:embed=true" frameborder="0" allowFullScreen="true"></iframe>
    
  9. In the top menu, select Page, and then select Stop Editing.

    Stop Editing

    The report appears on the page.

    iFrame sample

More questions? Try the Power BI Community.