步骤 1:将应用注册到 Azure ADStep 1: Register an app with Azure AD

本文是将数据推送到数据集的分步演练的一部分。This article is part of a step-by-step walkthrough to push data into a dataset.

将数据推送到 Power BI 数据集的第一步是在 Azure AD 中注册你的应用。The first step to push data into a Power BI dataset is to register your app in Azure AD. 你需要先执行此操作以获取客户端 ID,它会在 Azure AD 中标识你的 Web 应用。You need to do this first so that you have a Client ID that identifies your app in Azure AD. 没有客户端 ID,Azure AD 则无法对你的 Web 应用进行身份验证。Without a Client ID, Azure AD cannot authenticate your app.

注意:注册 Power BI 的应用前,需要注册 Power BI。NOTE: Before you register an app for Power BI, you need to Sign up for Power BI.

以下是在 Azure AD 中注册应用的步骤。Here are the steps to register an app in Azure AD.

在 Azure AD 中注册应用Register an app in Azure AD

  1. 请转到 dev.powerbi.com/apps。Go to dev.powerbi.com/apps.
  2. 单击使用现有帐户登录,并登录 Power BI 帐户。Click Sign in with your existing account, and sign into your Power BI account.
  3. 输入应用名称,例如“推送数据应用示例”。Enter an App Name such as "Sample push data app".
  4. 对于应用类型,选择本机应用For App Type, choose Native app.
  5. 输入重定向 Url,如 https://login.live.com/oauth20_desktop.srfEnter a Redirect URL, such as https://login.live.com/oauth20_desktop.srf. 对于本机客户端应用,重定向 URI 可为 Azure AD 提供有关其将进行身份验证的特定应用程序的更多详细信息。For a Native client app, a redirect uri gives Azure AD more details on the specific application that it will authenticate. 客户端应用的标准 URI 为 https://login.live.com/oauth20_desktop.srf。The standard Uri for a client app is https://login.live.com/oauth20_desktop.srf.
  6. 对于选择要访问的 API,请选择读写所有数据集For Choose APIs to access, choose Read and Write All Datasets. 有关所有 Power BI 应用权限的信息,请参阅 Power BI 权限For all Power BI app permissions, see Power BI Permissions.
  7. 单击注册应用,并保存生成的客户端 IDClick Register app, and save the Client ID that was generated. 客户端 ID 用于识别 Azure AD 中的应用。A Client ID identifies the app in Azure AD.

以下是注册适用于 Power BI 的应用程序页面应有的外观:Here's how your Register an Application for Power BI page should look:

接下来的步骤展示如何获取身份验证访问令牌The next step shows you how to get an authentication access token.

下一步 >Next Step >

后续步骤Next steps

注册 Power BISign up for Power BI
获取身份验证访问令牌Get an authentication access token
演练:将数据推送到数据集Walkthrough: Push data into a dataset
注册应用程序Register an application
Power BI REST API 概述Overview of Power BI REST API

更多问题?More questions? 尝试咨询 Power BI 社区Try asking the Power BI Community