cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
matt_b
Frequent Visitor

Binding a dataset to a gateway datasource doesn't seem to do anything?

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?

1 REPLY 1
matt_b
Frequent Visitor

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:

matt_b_0-1674474440876.png

 

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.