<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Binding a dataset to a gateway datasource doesn't seem to do anything? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Binding-a-dataset-to-a-gateway-datasource-doesn-t-seem-to-do/m-p/3037434#M40858</link>
    <description>&lt;P&gt;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.&amp;nbsp; If I get the details of the dataset's data source, using the &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources-in-group" target="_self"&gt;Dataset - Get Datasources In Group&lt;/A&gt; Rest API, I can see that it somehow already has an Id for a data gateway:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I then use the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/bind-to-gateway-in-group" target="_self"&gt;Datasets - Bind To Gateway In Group&lt;/A&gt;&amp;nbsp;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the gateway id is identical.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However - I can use the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group" target="_self"&gt;Datasets - Update Datasources In Group&lt;/A&gt;&amp;nbsp;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I successfully call the Bind To Gateway In Group Rest API again, it doesn't change the datasource's gateway id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me why this might happen?&amp;nbsp; Has anyone experienced anything like this before?&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 11:04:05 GMT</pubDate>
    <dc:creator>matt_b</dc:creator>
    <dc:date>2023-01-23T11:04:05Z</dc:date>
    <item>
      <title>Binding a dataset to a gateway datasource doesn't seem to do anything?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Binding-a-dataset-to-a-gateway-datasource-doesn-t-seem-to-do/m-p/3037434#M40858</link>
      <description>&lt;P&gt;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.&amp;nbsp; If I get the details of the dataset's data source, using the &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources-in-group" target="_self"&gt;Dataset - Get Datasources In Group&lt;/A&gt; Rest API, I can see that it somehow already has an Id for a data gateway:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I then use the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/bind-to-gateway-in-group" target="_self"&gt;Datasets - Bind To Gateway In Group&lt;/A&gt;&amp;nbsp;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the gateway id is identical.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However - I can use the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group" target="_self"&gt;Datasets - Update Datasources In Group&lt;/A&gt;&amp;nbsp;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I successfully call the Bind To Gateway In Group Rest API again, it doesn't change the datasource's gateway id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me why this might happen?&amp;nbsp; Has anyone experienced anything like this before?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:04:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Binding-a-dataset-to-a-gateway-datasource-doesn-t-seem-to-do/m-p/3037434#M40858</guid>
      <dc:creator>matt_b</dc:creator>
      <dc:date>2023-01-23T11:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Binding a dataset to a gateway datasource doesn't seem to do anything?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Binding-a-dataset-to-a-gateway-datasource-doesn-t-seem-to-do/m-p/3037568#M40860</link>
      <description>&lt;P&gt;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.&amp;nbsp; This is the response from a call to the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/gateways/get-datasource-users" target="_blank"&gt;Gateways - Get Datasource Users&lt;/A&gt;&amp;nbsp;endpoint:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "@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"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the identifier there is the Object Id of my service principal:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="matt_b_0-1674474440876.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860027iE33C6BD1C14955DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="matt_b_0-1674474440876.png" alt="matt_b_0-1674474440876.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:47:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Binding-a-dataset-to-a-gateway-datasource-doesn-t-seem-to-do/m-p/3037568#M40860</guid>
      <dc:creator>matt_b</dc:creator>
      <dc:date>2023-01-23T11:47:48Z</dc:date>
    </item>
  </channel>
</rss>

