配置 ArcGIS for Power BI

您必须是 ArcGIS for Microsoft 365 管理员,才能使用本主题中描述的工作流。

配置 ArcGIS Enterprise 跨域资源共享

在某些情况下,当您使用 ArcGIS Enterprise 帐户登录到 ArcGIS for Power BI 时,有效 ArcGIS Enterprise URL 未连接,并显示 URL 无效。 请重试。错误。

ArcGIS Enterprise 登录错误消息

此错误仅适用于 ArcGIS Enterprise 帐户。 默认情况下,ArcGIS Enterprise 门户允许使用跨域资源共享 (CORS) 的跨域请求。 这意味着,JavaScript 客户端(例如在任何域中托管的 web 应用程序)可以连接至门户资源。

要限制来自 JavaScript 应用程序特定域的请求,ArcGIS Enterprise 管理员可以通过将这些域名添加至 ArcGIS Enterprise 门户安全设置中的允许源列表,将门户配置为仅允许某些指定的域。 这样可降低未知应用程序向 web 服务发送恶意命令的风险。

根据 ArcGIS Enterprise 的版本和正在使用的 Power BI 连接,ArcGIS Enterprise 管理员可能需要启用并配置 CORS,ArcGIS for Power BI 才会正常工作。

Power BI 服务的允许源 (app.powerbi.com)

ArcGIS Enterprise 管理员必须配置允许源设置,才能配置组织成员从 Power BI 服务 (app.powerbi.com) 登录到 ArcGIS Enterprise

必须包含以下域:

  • https://arcgis.com
  • https://app.powerbi.com
  • https://powerbi.com

“允许源”设置

有关详细信息,请参阅限制对您的门户的跨域请求

Power BI Desktop 的允许源

ArcGIS Enterprise 管理员必须配置允许源设置,才能设置从 Power BI Desktop 登录到 ArcGIS Enterprise 的组织成员用户权限。

必须包含以下域:

  • https://arcgis.com
  • https://app.powerbi.com
  • https://powerbi.com
  • http://pbi.microsoft.com
  • https://pbi.microsoft.com
  • ms-pbi://pbi.microsoft.com
  • https://ms-pbi.pbi.microsoft.com

用于执行此配置的步骤将有所不同,具体取决于您使用的 ArcGIS Enterprise 版本。

ArcGIS Enterprise 10.7.1 的设置更新到 10.9

ArcGIS Enterprise 10.7.1 更新到 10.9 时,ArcGIS Enterprise 管理员必须配置允许源设置。 要更新允许源设置,请完成以下步骤:

  1. 验证您是否已登录 ArcGIS Enterprise 组织,以及是否具有管理组织的权限。
  2. 使用 https://webadaptorhost.domain.com/webadaptorname/sharing/rest URL 登录到 Sharing API。

    注:
    要完成此步骤,必须启用对 Sharing API 的 HTML 访问。 在许多安全环境中,对 Sharing API 的 HTML 访问受到限制。 要启用对 Sharing API 的 HTML 访问,https://webadaptorhost.domain.com/webadaptorname/portaladmin/security/config 下的 disableServicesDirectory 属性必须设置为 false

  3. 登录后,请转至 https://webadaptorhost.domain.com/webadaptorname/sharing/rest/portals/self
  4. 在页面底部,单击更新
  5. 在新加载的页面上,找到允许的源文本框。

    源将由逗号分隔,没有任何空格、引号或方括号。

  6. 将以下文本复制到允许的源文本框以添加 Power BI 源。

    https://arcgis.com,https://app.powerbi.com,https://powerbi.com,http://pbi.microsoft.com,https://pbi.microsoft.com,ms-pbi://pbi.microsoft.com,https://ms-pbi.pbi.microsoft.com

  7. 单击更新组织

Power BI 起点将被添加到允许的起点中。 更改内容将立即生效,无需重新启动门户。

更新 ArcGIS Enterprise 10.9.1 及更高版本的设置

要配置 ArcGIS Enterprise 10.9.1 及更高版本的允许源设置,请按照限制对门户的跨域请求中的说明进行操作。 不需要登录 Sharing API。