Groups - Add Group User
Grants the specified user the specified permissions to the specified workspace.
When user permissions to a workspace have been recently updated, the new permissions might not be immediately available through API calls. To refresh user permissions, use the Refresh User Permissions API call.
Permissions
This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.
Required Scope
Workspace.ReadWrite.All
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/users
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
group
|
path | True |
|
The workspace ID |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| groupUserAccessRight | True |
The access right (permission level) that a user has on the workspace |
|
| identifier | True |
|
Identifier of the principal |
| principalType | True |
The principal type |
|
| displayName |
|
Display name of the principal |
|
| emailAddress |
|
Email address of the user |
|
| graphId |
|
Identifier of the principal in Microsoft Graph. Only available for admin APIs. |
|
| profile |
A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
Examples
| 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
Definitions
|
Group |
A Power BI user with access to the workspace |
|
Group |
The access right (permission level) that a user has on the workspace |
|
Principal |
The principal type |
|
Service |
A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution. |
GroupUser
A Power BI user with access to the workspace
| Name | Type | Description |
|---|---|---|
| displayName |
|
Display name of the principal |
| emailAddress |
|
Email address of the user |
| graphId |
|
Identifier of the principal in Microsoft Graph. Only available for admin APIs. |
| groupUserAccessRight |
The access right (permission level) that a user has on the workspace |
|
| identifier |
|
Identifier of the principal |
| principalType |
The principal type |
|
| profile |
A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution. |
GroupUserAccessRight
The access right (permission level) that a user has on the workspace
| Name | Type | Description |
|---|---|---|
| Admin |
|
Administrator rights to workspace content |
| Contributor |
|
Read and explore (ReadExplore) access to workspace content |
| Member |
|
Read, reshare and explore (ReadReshareExplore) access rights to workspace content |
| None |
|
No access to workspace content |
| Viewer |
|
Read-only (Read) access to workspace content |
PrincipalType
The principal type
| Name | Type | Description |
|---|---|---|
| App |
|
Service principal type |
| Group |
|
Group principal type |
| None |
|
No principal type. Use for whole organization level access. |
| User |
|
User principal type |
ServicePrincipalProfile
A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution.
| Name | Type | Description |
|---|---|---|
| displayName |
|
The service principal profile name |
| id |
|
The service principal profile ID |