Share via


Datasets - Post Dataset User In Group

Grants the specified user's permissions to the specified dataset.

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.

Required Scope

Dataset.ReadWrite.All

Limitations

  • Adding permissions to service principals (app principalType) isn't supported
  • Caller must have ReadReshare permissions on the dataset.
  • This API call can't be used to grant dataset Write permission on the dataset

POST 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

DatasetUserAccessRightEntry

Required. The access right to grant to the user for the dataset.

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 granting ReadExplore right to a security group

Example

Sample request

POST https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/users
{
  "identifier": "[email protected]",
  "principalType": "User",
  "datasetUserAccessRight": "Read"
}

Sample response

Example for granting ReadExplore right to a security group

Sample request

POST 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
DatasetUserAccessRightEntry

Required. The access right to grant to the user for the dataset.

PostDatasetUserAccess

A Power BI user access right entry for a dataset

PrincipalType

The principal type

DatasetUserAccessRightEntry

Required. The access right to grant to the user for the dataset.

Value Description
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

PostDatasetUserAccess

A Power BI user access right entry for a dataset

Name Type Description
datasetUserAccessRight

DatasetUserAccessRightEntry

Required. The access right to grant to the user for the dataset.

identifier

string

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

principalType

PrincipalType

The principal type

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