Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
When I import a report into an empty workspace (a profile workspace, accessed with a Service Principal rather than my own workspace), I can access new report and dataset objects in the workspace. If I get the details of the dataset's data source, using the Dataset - Get Datasources In Group Rest API, I can see that it somehow already has an Id for a data gateway:
{
"@odata.context":"http://wabi-north-europe-i-primary-redirect.analysis.windows.net/v1.0/myorg/groups/0fabd266-e832-4adb-a77a-f4c98da8d611/$metadata#datasources","value":[
{
"datasourceType":"Sql","connectionDetails":{
"server":"dev-mb-mssql-deployment,31433","database":"xxxx"
},"datasourceId":"6917797a-1a2e-44db-bdc5-e87a1244af17","gatewayId":"36baeaf5-e58a-4d91-8ba1-6be83a5cb547"
}
]
}
However, if I then use the Datasets - Bind To Gateway In Group Rest API to bind the dataset to my On-Premise data gateway, and then use the Dataset - Get Datasources In Group Rest API again - the gatewayID of the dataset's datasource doesn't change:
{
"@odata.context":"http://wabi-north-europe-i-primary-redirect.analysis.windows.net/v1.0/myorg/groups/0fabd266-e832-4adb-a77a-f4c98da8d611/$metadata#datasources","value":[
{
"datasourceType":"Sql","connectionDetails":{
"server":"dev-mb-mssql-deployment,31433","database":"xxxx"
},"datasourceId":"6917797a-1a2e-44db-bdc5-e87a1244af17","gatewayId":"36baeaf5-e58a-4d91-8ba1-6be83a5cb547"
}
]
}
Note that the gateway id is identical.
However - I can use the Datasets - Update Datasources In Group Rest API to change the dataset datasource's connection details to another database - and this changes the datasourceId, BUT it doesn't change the gatewayId:
{
"@odata.context":"http://wabi-north-europe-i-primary-redirect.analysis.windows.net/v1.0/myorg/groups/0fabd266-e832-4adb-a77a-f4c98da8d611/$metadata#datasources","value":[
{
"datasourceType":"Sql","connectionDetails":{
"server":"xxxx.database.windows.net,1433","database":"xxxx"
},"datasourceId":"5e441ef8-6af9-4e57-8de1-41cabfe0a9a9","gatewayId":"36baeaf5-e58a-4d91-8ba1-6be83a5cb547"
}
]
}
Even if I successfully call the Bind To Gateway In Group Rest API again, it doesn't change the datasource's gateway id.
Can anyone tell me why this might happen? Has anyone experienced anything like this before?
I should probably add that the Service Principal I am using to access the "Bind To Gateway In Group" API endpoint is already configured as a user of the gateway I am attempting to bind to. This is the response from a call to the Gateways - Get Datasource Users endpoint:
{
"@odata.context":"http://wabi-north-europe-i-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#users","value":[
{
"datasourceAccessRight":"Read","displayName":"Power BI Embedded MB2","identifier":"b913f6a1-4bb4-4860-aa50-b22f71bb12b3","principalType":"App"
}
]
}
And the identifier there is the Object Id of my service principal:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
22 | |
2 | |
2 | |
2 | |
2 |