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
datasetId
path True

string

The dataset ID

groupId
path True

string (uuid)

The workspace ID

Request Body

Name Required Type Description
datasetUserAccessRight True

DatasetUserAccessRight

The access rights to assign to the user for the dataset (permission level)

identifier True

string

For principal type User, provide the UPN. Otherwise provide the object ID of the principal.

principalType True

PrincipalType

The principal type

Responses

Name Type Description
200 OK

OK

Examples

Example
Example for updating security group dataset permissions to ReadExplore

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
DatasetUserAccess

A Power BI principal access right entry for a dataset

DatasetUserAccessRight

The access right that the user has for the dataset (permission level)

PrincipalType

The principal type

DatasetUserAccess

A Power BI principal access right entry for a dataset

Name Type Description
datasetUserAccessRight

DatasetUserAccessRight

The access rights to assign to the user for the dataset (permission level)

identifier

string

For principal type User, provide the UPN. Otherwise provide the object ID of the principal.

principalType

PrincipalType

The principal type

DatasetUserAccessRight

The access right that the user has for the dataset (permission level)

Value Description
None

Removes permission to the content in the dataset

Read

Grants Read access to the content in the dataset

ReadExplore

Grants Read and Explore access to the content in the dataset

ReadReshare

Grants Read and Reshare access to the content in the dataset

ReadReshareExplore

Grants Read, Reshare, and Explore access to the content in the dataset

ReadWrite

Grants Read and Write access to the content in the dataset

ReadWriteExplore

Grants Read, Write, and Explore access to the content in the dataset

ReadWriteReshare

Grants Read, Write, and Reshare access to the content in the dataset

ReadWriteReshareExplore

Grants Read, Write, Reshare, and Explore access to the content in the dataset

PrincipalType

The principal type

Value Description
App

Service principal type

Group

Group principal type

None

No principal type. Use for whole organization level access.

User

User principal type