Gateways - Get Datasource Users

Returns a list of users who have access to the specified data source.

Permissions

The user must have gateway admin permissions.

Required Scope

Dataset.ReadWrite.All or Dataset.Read.All

Limitations

Virtual network (VNet) gateways aren't supported.

GET https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}/users

URI Parameters

Name In Required Type Description
datasourceId
path True

string

uuid

The data source ID

gatewayId
path True

string

uuid

The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID.

Responses

Name Type Description
200 OK

DatasourceUsers

OK

Examples

Example

Sample request

GET https://api.powerbi.com/v1.0/myorg/gateways/1f69e798-5852-4fdd-ab01-33bb14b6e934/datasources/252b9de8-d915-4788-aaeb-ec8c2395f970/users

Sample response

{
  "value": [
    {
      "datasourceAccessRight": "Read",
      "displayName": "John Nick",
      "emailAddress": "john@contoso.com",
      "identifier": "john@contoso.com",
      "principalType": "User"
    },
    {
      "datasourceAccessRight": "ReadOverrideEffectiveIdentity",
      "displayName": "ContosoTestApp",
      "identifier": "3d9b93c6-7b6d-4801-a491-1738910904fd",
      "principalType": "App"
    }
  ]
}

Definitions

Name Description
DatasourceUser

A Power BI user with access to the data source

DatasourceUserAccessRight

The access right (permission level) that a user has on the data source

DatasourceUsers

The OData response wrapper for a list of Power BI users with access to a data source

PrincipalType

The principal type

ServicePrincipalProfile

A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution.

DatasourceUser

A Power BI user with access to the data source

Name Type Description
datasourceAccessRight

DatasourceUserAccessRight

The access right (permission level) that a user has on the data source

displayName

string

The display name of the principal

emailAddress

string

The email address of the user

identifier

string

The object ID of the principal

principalType

PrincipalType

The principal type

profile

ServicePrincipalProfile

A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution.

DatasourceUserAccessRight

The access right (permission level) that a user has on the data source

Name Type Description
None

string

No permission to access the data source. Only applies when updating user permissions.

Read

string

Datasets owned by the user have read access to the data source

ReadOverrideEffectiveIdentity

string

The user can override the effective identity for Power BI Embedded. Applicable only for on-premises Analysis Services data sources.

DatasourceUsers

The OData response wrapper for a list of Power BI users with access to a data source

Name Type Description
odata.context

string

value

DatasourceUser[]

The list of users with access to a data source

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

ServicePrincipalProfile

A Power BI service principal profile. Only relevant for Power BI Embedded multi-tenancy solution.

Name Type Description
displayName

string

The service principal profile name

id

string

The service principal profile ID