Admin - Groups AddUserAsAdmin
Grants user permissions to the specified workspace.
This API call only supports adding a user, security group, M365 group and service principal.
Permissions
The user must be a Fabric administrator.
Required Scope
Tenant.ReadWrite.All
Limitations
- Maximum 200 requests per hour.
- Each workspace is limited to a maximum of 1,000 users or groups in workspace roles (Admin, Member, Contributor, Viewer). The number of users within a group is not limited. The limitation also covers external guests.
POST https://api.powerbi.com/v1.0/myorg/admin/groups/{groupId}/users
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
group
|
path | True |
string (uuid) |
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 |
string |
Identifier of the principal |
| principalType | True |
The principal type |
|
| displayName |
string |
Display name of the principal |
|
| emailAddress |
string |
Email address of the user |
|
| graphId |
string |
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. |
||
| userType |
string |
Type of the user. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
Examples
| Add security group to workspace example |
| Add service principal to workspace example |
| Add user to group example |
Add security group to workspace example
Sample request
POST https://api.powerbi.com/v1.0/myorg/admin/groups/206d27ca-94e8-4a69-855b-5c32bdd458a8/users
{
"identifier": "ece007fa-2f19-4df1-bdd5-539881ec5f83",
"principalType": "Group",
"groupUserAccessRight": "Member"
}
Sample response
Add service principal to workspace example
Sample request
POST https://api.powerbi.com/v1.0/myorg/admin/groups/206d27ca-94e8-4a69-855b-5c32bdd458a8/users
{
"identifier": "84c468ad-12f1-471e-af6f-0999da422391",
"principalType": "App",
"groupUserAccessRight": "Viewer"
}
Sample response
Add user to group example
Sample request
POST https://api.powerbi.com/v1.0/myorg/admin/groups/206d27ca-94e8-4a69-855b-5c32bdd458a8/users
{
"emailAddress": "[email protected]",
"groupUserAccessRight": "Admin"
}
Sample response
Definitions
| Name | Description |
|---|---|
|
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 |
string |
Display name of the principal |
| emailAddress |
string |
Email address of the user |
| graphId |
string |
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 |
string |
Identifier of the principal |
| principalType |
The principal type |
|
| profile |
A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution. |
|
| userType |
string |
Type of the user. |
GroupUserAccessRight
The access right (permission level) that a user has on the workspace
| Value | Description |
|---|---|
| None |
No access to workspace content |
| Member |
Read, reshare and explore (ReadReshareExplore) access rights to workspace content |
| Admin |
Administrator rights to workspace content |
| Contributor |
Read and explore (ReadExplore) access to workspace content |
| Viewer |
Read-only (Read) access to workspace content |
PrincipalType
The principal type
| Value | Description |
|---|---|
| None |
No principal type. Use for whole organization level access. |
| User |
User principal type |
| Group |
Group principal type |
| App |
Service principal type |
ServicePrincipalProfile
A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution.
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The service principal profile name |
| id |
string (uuid) |
The service principal profile ID |