Datasets - Put Dataset User In Group
Updates the existing dataset permissions of the specified user to the specified permissions.
When user permissions to a dataset 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.
This API call can be used to remove all the dataset permissions of the specified user by using datasetUserAccessRight: None
Required Scope
Dataset.ReadWrite.All
Permissions
The permissions for this API call are listed in Datasets permissions.
Limitations
- Updating permissions to service principals (app principalType) isn't supported
- Caller must have ReadWriteReshare permissions on the dataset. That is, folder admins, members and contributors with Reshare permissions, or dataset owners.
- This API can't be used to add or remove write permission.
- This API can't be used to remove folder-level inherited permissions. For folder admins and members, the ReadWriteReshareExplore permission on the folder's datasets is inherited. For folder contributors, the ReadWriteExplore permission on the folder's datasets is inherited. For folder viewers, the Read permission on the folder's datasets is inherited.
PUT https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/users
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
dataset
|
path | True |
string |
The dataset ID |
group
|
path | True |
string uuid |
The workspace ID |
Request Body
Name | Required | Type | Description |
---|---|---|---|
datasetUserAccessRight | True |
The access rights to assign to the user for the dataset (permission level) |
|
identifier | True |
string |
For principal type |
principalType | True |
The principal type |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Examples
Example |
Example for updating security group dataset permissions to Read |
Example
Sample request
PUT https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/users
{
"identifier": "john@contoso.com",
"principalType": "User",
"datasetUserAccessRight": "Read"
}
Sample response
Example for updating security group dataset permissions to ReadExplore
Sample request
PUT https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/users
{
"identifier": "154aef10-47b8-48c4-ab97-f0bf9d5f8fcf",
"principalType": "Group",
"datasetUserAccessRight": "ReadReshare"
}
Sample response
Definitions
Name | Description |
---|---|
Dataset |
A Power BI principal access right entry for a dataset |
Dataset |
The access right that the user has for the dataset (permission level) |
Principal |
The principal type |
DatasetUserAccess
A Power BI principal access right entry for a dataset
Name | Type | Description |
---|---|---|
datasetUserAccessRight |
The access rights to assign to the user for the dataset (permission level) |
|
identifier |
string |
For principal type |
principalType |
The principal type |
DatasetUserAccessRight
The access right that the user has for the dataset (permission level)
Name | Type | Description |
---|---|---|
None |
string |
Removes permission to the content in the dataset |
Read |
string |
Grants Read access to the content in the dataset |
ReadExplore |
string |
Grants Read and Explore access to the content in the dataset |
ReadReshare |
string |
Grants Read and Reshare access to the content in the dataset |
ReadReshareExplore |
string |
Grants Read, Reshare, and Explore access to the content in the dataset |
ReadWrite |
string |
Grants Read and Write access to the content in the dataset |
ReadWriteExplore |
string |
Grants Read, Write, and Explore access to the content in the dataset |
ReadWriteReshare |
string |
Grants Read, Write, and Reshare access to the content in the dataset |
ReadWriteReshareExplore |
string |
Grants Read, Write, Reshare, and Explore access to the content in the dataset |
PrincipalType
The principal type
Name | Type | Description |
---|---|---|
App |
string |
Service principal type |
Group |
string |
Group principal type |
None |
string |
No principal type. Use for whole organization level access. |
User |
string |
User principal type |