在 SharePoint Online 中嵌入報表網頁組件Embed with report web part in SharePoint Online


你可以使用 SharePoint Online 的 Power BI 新報表網頁組件,輕鬆地在 SharePoint Online 的網頁中內嵌互動式 Power BI 報表。With Power BI's new report web part for SharePoint Online, you can easily embed interactive Power BI reports in SharePoint Online pages.

當使用新的 [內嵌在 SharePoint Online 中] 選項時,內嵌的報表受會到全面性防護,所以您可以輕鬆地建立安全的內部入口網站。When using the new Embed in SharePoint Online option, the embedded reports are fully secure, so you can easily create secure internal portals.


為了讓 [內嵌在 SharePoint Online 中] 報表運作,需要滿足下列條件:For Embed in SharePoint Online reports to work, the following is required:

內嵌報表Embed your report

若要將報表嵌入 SharePoint Online,您必須取得報表 URL,並將它與 SharePoint Online 的 Power BI Web 組件搭配使用。To embed your report into SharePoint Online, you need to get the report URL and use it with SharePoint Online's Power BI web part.

取得報表 URLGet a report URL

  1. 在 Power BI 內檢視報表。Within Power BI, view the report.

  2. 選取 [檔案] 下拉式功能表,然後選取 [內嵌在 SharePoint Online 中] 。Select the File dropdown menu, then select Embed in SharePoint Online.

    [檔案] 功能表

  3. 從對話方塊複製報表 URL。Copy the report URL from the dialog.


將 Power BI 報表新增至 SharePoint Online 頁面Add the Power BI report to a SharePoint Online page

  1. 在 SharePoint Online 中開啟目標頁面,然後選取 [編輯] 。Open the target page in SharePoint Online and select Edit.

    SP 編輯頁面

    或者在 SharePoint Online 中選取 [+ 新增] ,以建立新的現代化網站頁面。Or, in Sharepoint Online, select + New to create a new modern site page.

    SP 新增頁面

  2. 選取 [+] 下拉式清單,然後選取 [Power BI] Web 組件。Select the + dropdown and then select the Power BI web part.

    SP 新增網頁組件

  3. 選取 [新增報告] 。Select Add report.

    SP 新報表

  4. 將先前複製的報表 URL 貼入 Power BI 報表連結窗格中。Paste the previously-copied report URL into the Power BI report link pane. 報表會自動載入。The report loads automatically.

    SP 新增網頁組件屬性

  5. 選取 [發佈] ,讓 SharePoint Online 使用者能看見您所做的變更。Select Publish to make the change visible to your SharePoint Online users.

    載入的 SP 報表

授與報告存取權Grant access to reports

在 SharePoint Online 中內嵌報表,並不會自動授與使用者檢視報表的權限,您必須設定 Power BI 的檢視權限。Embedding a report in SharePoint Online doesn't automatically give users permission to view the report - you need to set view permissions in Power BI.


請務必檢閱可以看到 Power BI 服務內報表的成員,並將存取權授與未列出的成員。Make sure to review who can see the report within the Power BI service and grant access to those not listed.

有兩種方式可提供 Power BI 的報表存取權。There are two ways to provide report access in Power BI. 如果您使用 Office 365 群組來建置 SharePoint Online 小組網站,第一種方式是要將使用者列為 Power BI 服務內的應用程式工作區SharePoint 頁面的成員。The first way, if you're using an Office 365 Group to build your SharePoint Online team site, is to list the user as a member of the app workspace within the Power BI service and the SharePoint page. 如需詳細資訊,請參閱如何管理應用程式工作區For more information, see how to manage an app workspace.

第二種方式是在應用程式中內嵌報表,並將其直接與使用者共用:The second way is to embed a report within an app and share it directly with users:

  1. 必須身為 Pro 使用者的作者,在應用程式工作區中建立報表。The author, who must be a Pro user, creates a report in an app workspace. 若要與「Power BI 免費使用者」 共用,您需要將該應用程式工作區設定為「Premium 工作區」 。To share with Power BI free users, the app workspace needs to be set as a Premium workspace.

  2. 作者會發佈應用程式,然後加以安裝。The author publishes the app and installs it. 作者必須安裝應用程式,使其可以存取用於在 SharePoint Online 中進行內嵌的報表 URL。The author must install the app so it has access to the report URL that is used for embedding in SharePoint Online.

  3. 現在,所有使用者也都需要安裝應用程式。Now all end users need to install the app too. 您也可以使用 [自動安裝應用程式] 功能 (您可以在 Power BI 管理入口網站 中啟用此功能),為終端使用者預先安裝應用程式。You can also use the Install app automatically feature, which you can enable in the Power BI admin portal, to have the app pre-installed for end users.


  4. 作者開啟應用程式,並移至報表。The author opens the app and goes to the report.

  5. 作者從應用程式安裝的報表複製內嵌報表 URL。The author copies the embed report URL from the report the app installed. 請勿使用來自應用程式工作區的原始報表 URL。Don't use the original report URL from the app workspace.

  6. 在 SharePoint Online 中建立新的小組網站。Create a new team site in SharePoint Online.

  7. 將先前複製的報表 URL 新增至 Power BI Web 組件。Add the previously-copied report URL to the Power BI web part.

  8. 新增要使用您建立的 Power BI 應用程式中 SharePoint Online 頁面上之資料的所有使用者和/或群組。Add all end users and/or groups who are going to consume the data on the SharePoint Online page and in the Power BI app you created.


    使用者或群組需要存取 SharePoint Online 頁面,及 Power BI 應用程式中的報表,才能看到 SharePoint 頁面上的報表。Users or groups need access to both the SharePoint Online page and the report in the Power BI app to see the report on the SharePoint page.

現在使用者可以移至 SharePoint Online 中的小組網站,並在頁面上檢視報表。Now the end user can go to the team site in SharePoint Online and view the reports on the page.

Multi-Factor AuthenticationMulti-factor authentication

如果您的 Power BI 環境需要您使用多重要素驗證進行登入,您可能會受要求使用安全性裝置進行登入,以驗證您的身分識別。If your Power BI environment requires you to sign in using multi-factor authentication, you may be asked to sign in with a security device to verify your identity. 如果您沒有使用多重要素驗證登入 SharePoint.Online,但您的 Power BI 環境需要使用安全性裝置來驗證帳戶,就會發生此情況。This occurs if you did not sign in to SharePoint Online using multi-factor authentication, but your Power BI environment requires a security device to validate an account.


Power BI 尚未支援使用 Azure Active Directory 2.0 進行多重要素驗證,使用者會看到一則錯誤訊息。Power BI does not yet support multi-factor authentication with Azure Active Directory 2.0 - users will see an error message. 如果使用者使用其安全性裝置再次登入 SharePoint Online ,則可以檢視報表。If the user signs in again to SharePoint Online using their security device, they may be able to view the report.

網頁組件設定Web part settings

以下是您可以針對 SharePoint Online 的 Power BI Web 組件調整的設定。Below are the settings you can adjust for the Power BI web part for SharePoint Online.

SP 網頁組件屬性

屬性Property 描述Description
頁面名稱Page name 設定 Web 組件的預設頁面。Sets the web part's default page. 從下拉式清單中選取一個值。Select a value from the drop-down. 如果沒有顯示任何頁面,可能是您的報表只有一個頁面,或您所貼上的 URL 包含頁面名稱。If no pages are displayed, either your report has one page, or the URL you pasted contains a page name. 從 URL 移除報表區段,以選取特定頁面。Remove the report section from the URL to select a specific page.
顯示Display 調整報表納入 SharePoint Online 頁面的方式。Adjusts how the report fits within the SharePoint Online page.
顯示瀏覽窗格Show Navigation Pane 顯示或隱藏頁面功能窗格。Shows or hides the page navigation pane.
顯示篩選窗格Show Filter Pane 顯示或隱藏篩選窗格。Shows or hides the filter pane.

不會載入的報表Reports that do not load

如果未在 Power BI Web 組件內載入您的報表,您可能會看到下列訊息:If your report does not load within the Power BI web part, you may see the following message:


有兩個常見的原因會導致此訊息的出現。There are two common reasons for this message.

  1. 您沒有報表存取權。You do not have report access.
  2. 報表已刪除。The report was deleted.

請連絡 SharePoint Online 頁面擁有者,以協助解決問題。Contact the SharePoint Online page owner to help resolve the issue.


在 SharePoint 中檢視報表的使用者需要 Power BI Pro 授權,或者內容需要位於 Power BI Premium 容量 (EM 或 P SKU) 的工作空間中。Users viewing a report in SharePoint need either a Power BI Pro license or the content needs to be in a workspace that's in a Power BI Premium capacity (EM or P SKU).

已知的問題及限制Known issues and limitations

  • 錯誤:「An error occurred, please try logging out and back in and then revisiting this page. (發生錯誤。請登出再登入,然後再次前往此頁面。)Error: "An error occurred, please try logging out and back in and then revisiting this page. 相互關聯識別碼: 未定義,http 回應狀態:400,伺服器錯誤碼 10001,訊息:遺漏重新整理權杖」Correlation ID: undefined, http response status: 400, server error code 10001, message: Missing refresh token"

    如果您收到這個錯誤,請嘗試下列其中一個疑難排解步驟。If you receive this error, try one of the troubleshooting steps below.

    1. 登出再登入 SharePoint。Sign out of SharePoint and sign back in. 請務必關閉所有瀏覽器視窗,然後再重新登入。Be sure to close all browser windows before signing back in.

    2. 若您的使用者帳戶需要多重要素驗證 (MFA),則請使用 MFA 裝置 (手機應用程式、智慧卡等等) 登入 SharePoint。If your user account requires multi-factor authentication (MFA), then sign in to SharePoint using your MFA device (phone app, smart card, etc.).

    3. 不支援 Azure B2B 來賓使用者帳戶。Azure B2B Guest users accounts are not supported. 使用者看到的 Power BI 標誌會顯示載入的部分,但不會顯示報表。Users see the Power BI logo that shows the part is loading, but it doesn't show the report.

  • Power BI 與 SharePoint Online 支援的當地語系化語言不盡相同。Power BI does not support the same localized languages that SharePoint Online does. 因此,您可能會在內嵌報表中看到未適當當地語系化的內容。As a result, you may not see proper localization within the embedded report.

  • 您若使用 Internet Explorer 10,可能會遇到問題。You may encounter issues if using Internet Explorer 10. 您可以參閱 Power BIOffice 365 的瀏覽器支援。You can look at the browsers support for Power BI and for Office 365.

  • 國家/地區雲端不提供 Power BI Web 組件。The Power BI web part is not available for national clouds.

  • 此 Web 組件不支援傳統的 SharePoint 伺服器。The classic SharePoint Server is not supported with this web part.

  • URL 篩選不受到 SPO Web 組件支援。URL filters are not supported with the SPO web part.

後續步驟Next steps

有其他問題嗎?More questions? 嘗試在 Power BI 社群提問Try asking the Power BI Community