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": "john@contoso.com",
  "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.

Name Type Description
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

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

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