Datasets - Post Dataset User
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/datasets/{datasetId}/users
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
dataset
|
path | True |
string |
The dataset ID |
Request Body
Name | Required | Type | Description |
---|---|---|---|
datasetUserAccessRight | True |
Required. The access right to grant to the user for the dataset. |
|
identifier | True |
string |
For principal type |
principalType | True |
The principal type |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Examples
Example |
Example for granting Read |
Example
Sample request
POST 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 granting ReadExplore right to a security group
Sample request
POST 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 |
---|---|
Dataset |
Required. The access right to grant to the user for the dataset. |
Post |
A Power BI user access right entry for a dataset |
Principal |
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 |
Required. The access right to grant to the user for the dataset. |
|
identifier |
string |
For principal type |
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 |