Datasets - Put Dataset User

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/datasets/{datasetId}/users

URI Parameters

Name In Required Type Description
datasetId
path True

string

The dataset 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/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/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)

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