Share via


Groups - Add Group User

將指定的使用者指定的許可權授與指定的工作區。

權限

此 API 呼叫可由服務主體設定檔呼叫。 如需詳細資訊,請參閱:Power BI Embedded中的服務主體設定檔

必要範圍

Workspace.ReadWrite.All

限制

  • 工作區的使用者許可權需要一段時間才能更新,而且在使用 API 呼叫時可能無法立即使用。 若要重新整理使用者權限,請使用 重新整理使用者權限 API 呼叫。

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/users

URI 參數

名稱 位於 必要 類型 Description
groupId
path True

string

uuid

工作區識別碼

要求本文

名稱 必要 類型 Description
groupUserAccessRight True

GroupUserAccessRight

使用者) 工作區上的許可權層級 (存取權限

identifier True

string

主體的識別碼

principalType True

PrincipalType

主體類型

displayName

string

主體的顯示名稱

emailAddress

string

使用者的電子郵件地址

graphId

string

Microsoft Graph 中主體的識別碼。 僅適用于系統管理員 API。

profile

ServicePrincipalProfile

Power BI 服務主體設定檔。 僅適用于Power BI Embedded多租使用者解決方案

userType

string

使用者的型別。

回應

名稱 類型 Description
200 OK

確定

範例

Assign administrator user access rights to a service principal example
Example

Assign administrator user access rights to a service principal example

Sample Request

POST https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/users
{
  "identifier": "1f69e798-5852-4fdd-ab01-33bb14b6e934",
  "groupUserAccessRight": "Admin",
  "principalType": "App"
}

Sample Response

Example

Sample Request

POST https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/users
{
  "emailAddress": "john@contoso.com",
  "groupUserAccessRight": "Admin"
}

Sample Response

定義

名稱 Description
GroupUser

具有工作區存取權的 Power BI 使用者

GroupUserAccessRight

使用者) 工作區上的許可權層級 (存取權限

PrincipalType

主體類型

ServicePrincipalProfile

Power BI 服務主體設定檔。 僅適用于Power BI Embedded多租使用者解決方案

GroupUser

具有工作區存取權的 Power BI 使用者

名稱 類型 Description
displayName

string

主體的顯示名稱

emailAddress

string

使用者的電子郵件地址

graphId

string

Microsoft Graph 中主體的識別碼。 僅適用于系統管理員 API。

groupUserAccessRight

GroupUserAccessRight

使用者) 工作區上的許可權層級 (存取權限

identifier

string

主體的識別碼

principalType

PrincipalType

主體類型

profile

ServicePrincipalProfile

Power BI 服務主體設定檔。 僅適用于Power BI Embedded多租使用者解決方案

userType

string

使用者的型別。

GroupUserAccessRight

使用者) 工作區上的許可權層級 (存取權限

名稱 類型 Description
Admin

string

工作區內容的系統管理員許可權

Contributor

string

讀取和探索 (ReadExplore) 工作區內容的存取權

Member

string

讀取、重新共用和探索 (ReadReshareExplore) 工作區內容的存取權限

None

string

無法存取工作區內容

Viewer

string

唯讀 (讀取工作區內容的) 存取權

PrincipalType

主體類型

名稱 類型 Description
App

string

服務主體類型

Group

string

群組主體類型

None

string

沒有主體類型。 用於整個組織層級存取。

User

string

使用者主體類型

ServicePrincipalProfile

Power BI 服務主體設定檔。 僅適用于Power BI Embedded多租使用者解決方案

名稱 類型 Description
displayName

string

服務主體設定檔名稱

id

string

服務主體設定檔識別碼