Admin - Dataflows GetDataflowDatasourcesAsAdmin

Returns a list of data sources for the specified dataflow.

Deleted data sources will still appear in the response. This may include both cloud and on-premise data gateway sources. For more information see Dataflows considerations and limitations.

Permissions

  • The user must be a Fabric administrator or authenticate using a service principal.
  • Delegated permissions are supported.

When running under service prinicipal authentication, an app must not have any admin-consent required premissions for Power BI set on it in the Azure portal.

Required Scope

Tenant.Read.All or Tenant.ReadWrite.All

Relevant only when authenticating via a standard delegated admin access token. Must not be present when authentication via a service principal is used.

GET https://api.powerbi.com/v1.0/myorg/admin/dataflows/{dataflowId}/datasources

URI Parameters

Name In Required Type Description
dataflowId
path True

string

uuid

The dataflow ID

Responses

Name Type Description
200 OK

Datasources

OK

Examples

Example

Sample request

GET https://api.powerbi.com/v1.0/myorg/admin/dataflows/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample response

{
  "value": [
    {
      "name": "301",
      "connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False",
      "datasourceType": "Sql",
      "datasourceId": "16a54ccd-620d-4af3-9197-0b8c779a9a6d",
      "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674",
      "connectionDetails": {
        "server": "MyServer.database.windows.net",
        "database": "MyDatabase"
      }
    }
  ]
}

Definitions

Name Description
Datasource

A Power BI data source

DatasourceConnectionDetails

The Power BI data source connection details. See examples in Get Datasources or Get Datasources In Group.

Datasources

The OData response wrapper for a Power BI data source collection

Datasource

A Power BI data source

Name Type Description
connectionDetails

DatasourceConnectionDetails

The data source connection details

connectionString

string

(Deprecated) The data source connection string. Available only for DirectQuery.

datasourceId

string

The bound data source ID, which is empty when not bound to a gateway

datasourceType

string

The data source type

gatewayId

string

The bound gateway ID, which is empty when not bound to a gateway. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster and is similar to the gateway cluster ID.

name

string

(Deprecated) The data source name. Available only for DirectQuery.

DatasourceConnectionDetails

The Power BI data source connection details. See examples in Get Datasources or Get Datasources In Group.

Name Type Description
account

string

The connection account

classInfo

string

The connection class information

database

string

The connection database

domain

string

The connection domain

emailAddress

string

The connection email address

kind

string

The connection kind

loginServer

string

The connection login server

path

string

The connection path

server

string

The connection server

url

string

The connection URL

Datasources

The OData response wrapper for a Power BI data source collection

Name Type Description
odata.context

string

OData context

value

Datasource[]

The data source collection