<?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 Re: &amp;quot;Operation is not supported for selector&amp;quot; when using &amp;quot;Update datasources&amp;quot; RE in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/376655#M11205</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/57316"&gt;@devkeydet&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the documentation, we will get status 400 when:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Body contains multiple requests with the same datasource selector.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Missing or empty updateDetails in body.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Attempting to update a datasource with invalid connection details.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Datasource type doesn't support update operation.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Attempting to update a connection from cloud to on-premises or on-premises to cloud.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In addition, could you try the solution below to see if it works in your scenario?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="" href="https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/" target="_self" rel="nofollow noopener noreferrer"&gt;Query Parameter&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in&amp;nbsp;&lt;SPAN&gt;Data Source dialogs(url) to create a the dataset, so that you can change the data source by just modifying the corresponding Parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Use the the&amp;nbsp;&amp;nbsp;&lt;A title="" href="https://msdn.microsoft.com/en-us/library/mt845781.aspx" target="_self" rel="nofollow noopener noreferrer"&gt;Set parameters&lt;/A&gt;&amp;nbsp;operation(Power BI REST API) to dynamically change the Parameters in your code, which will also&amp;nbsp;change the actual connection (url).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. Use the&amp;nbsp;&amp;nbsp;&lt;A title="" href="https://msdn.microsoft.com/en-us/library/d6d82f0d-4b13-452d-a23a-706c80fc7a18?f=255&amp;amp;MSPPError=-2147217396" target="_self" rel="nofollow noopener noreferrer"&gt;Patch data source&lt;/A&gt;&amp;nbsp;operation to update the credentials for the changed data source. Reference:&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/Developer/Patching-an-Online-DirectQuery-datasource/m-p/351230" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Patching-an-Online-DirectQuery-datasource/m-p/351230&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 06:13:43 GMT</pubDate>
    <dc:creator>v-ljerr-msft</dc:creator>
    <dc:date>2018-03-15T06:13:43Z</dc:date>
    <item>
      <title>"Operation is not supported for selector" when using "Update datasources" REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/372441#M11107</link>
      <description>&lt;P&gt;I am trying to automate the publishing of a .pbix file, then change the "url" value of the OData datasource, in order to have a way to automation deployment from dev-&amp;gt;test-&amp;gt;prod.&amp;nbsp; When I make an http post to:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{valid-group-id}/datasets/{valid-dataset-id}/updatedatasources" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{valid-group-id}/datasets/{valid-dataset-id}/updatedatasources&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;...with the following body:&lt;BR /&gt;&lt;EM&gt;{ &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; "updateDetails":[ &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "connectionDetails": &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "&lt;A href="https://new-value.api.crm.dynamics.com/api/data/v8.2" target="_blank"&gt;https://new-value.api.crm.dynamics.com/api/data/v8.2&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "datasourceSelector": &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "datasourceType": "OData", &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "connectionDetails":&amp;nbsp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url":"&lt;A href="https://old-value.api.crm.dynamics.com/api/data/v8.2" target="_blank"&gt;https://old-value.api.crm.dynamics.com/api/data/v8.2&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; ] &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;...the status is 400 with an "Operation is not supported for selector".&amp;nbsp; However, according to my interpretation of &lt;A href="https://msdn.microsoft.com/en-us/library/mt814715.aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/mt814715.aspx&lt;/A&gt; this should be supported.&amp;nbsp; Any thoughts on why I am getting this error?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 14:50:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/372441#M11107</guid>
      <dc:creator>devkeydet</dc:creator>
      <dc:date>2018-03-08T14:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: "Operation is not supported for selector" when using "Update datasources" RE</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/376655#M11205</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/57316"&gt;@devkeydet&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the documentation, we will get status 400 when:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Body contains multiple requests with the same datasource selector.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Missing or empty updateDetails in body.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Attempting to update a datasource with invalid connection details.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Datasource type doesn't support update operation.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Attempting to update a connection from cloud to on-premises or on-premises to cloud.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In addition, could you try the solution below to see if it works in your scenario?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="" href="https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/" target="_self" rel="nofollow noopener noreferrer"&gt;Query Parameter&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in&amp;nbsp;&lt;SPAN&gt;Data Source dialogs(url) to create a the dataset, so that you can change the data source by just modifying the corresponding Parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Use the the&amp;nbsp;&amp;nbsp;&lt;A title="" href="https://msdn.microsoft.com/en-us/library/mt845781.aspx" target="_self" rel="nofollow noopener noreferrer"&gt;Set parameters&lt;/A&gt;&amp;nbsp;operation(Power BI REST API) to dynamically change the Parameters in your code, which will also&amp;nbsp;change the actual connection (url).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. Use the&amp;nbsp;&amp;nbsp;&lt;A title="" href="https://msdn.microsoft.com/en-us/library/d6d82f0d-4b13-452d-a23a-706c80fc7a18?f=255&amp;amp;MSPPError=-2147217396" target="_self" rel="nofollow noopener noreferrer"&gt;Patch data source&lt;/A&gt;&amp;nbsp;operation to update the credentials for the changed data source. Reference:&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/Developer/Patching-an-Online-DirectQuery-datasource/m-p/351230" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Patching-an-Online-DirectQuery-datasource/m-p/351230&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 06:13:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/376655#M11205</guid>
      <dc:creator>v-ljerr-msft</dc:creator>
      <dc:date>2018-03-15T06:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: "Operation is not supported for selector" when using "Update datasources" RE</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/511982#M15796</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After looking around quite intensely, I believe there isn't an actual answer to the problem posed in this thread. At the moment I'm facing the same issue and am getting especially frustrated with the lack of more in depth information from the REST API.&lt;/P&gt;&lt;P&gt;I have a report that works just fine and for which the datasource can be changed when using the Power BI Desktop app. However trying to accomplish the same using the REST API's is failing.&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;switching between practically identical databases, both cloud and both authenticated using Basic auth.&lt;BR /&gt;The body is (a bit redacted):&lt;/P&gt;&lt;PRE&gt;{
  "updateDetails": [
    {
      "datasourceSelector": {
        "datasourceType": "Sql",
            "connectionDetails": {
                "server": "server-one.database.windows.net",
                "database": "server-one-database-db"
            }
      },
      "connectionDetails": {
        "server": "server-two.database.windows.net",
        "database": "server-two-database-db"
      }
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;The response I'm receiving is as follows:&lt;/P&gt;&lt;PRE&gt;{
    "error": {
        "code": "InvalidRequest",
        "message": "Operation is not supported for selector #23"
    }
}&lt;/PRE&gt;&lt;P&gt;And... well, that's it actually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the datasources fetch from the gateway they are listed as, from which I concluded they are authenticated just fine.&lt;/P&gt;&lt;PRE&gt;{
            "id": "&amp;lt;uuid&amp;gt;",
            "gatewayId": "&amp;lt;uuid of cloud gw&amp;gt;",
            "datasourceType": "Sql",
            "connectionDetails": "{\"server\":\"server-two.database.windows.net\",\"database\":\"server-two-database-db\"}",
            "credentialType": "Basic",
            "credentialDetails": {
                "useEndUserOAuth2Credentials": false
            }
        },{
            "id": "&amp;lt;uuid&amp;gt;",
            "gatewayId": "&amp;lt;uuid of cloud gw&amp;gt;",
            "datasourceType": "Sql",
            "connectionDetails": "{\"server\":\"server-one.database.windows.net\",\"database\":\"server-one-database-db\"}",
            "credentialType": "Basic",
            "credentialDetails": {
                "useEndUserOAuth2Credentials": false
            }
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why would it be possible to switch datasources using the desktop app, but fail to do so using the REST API?&lt;BR /&gt;Is there a way to get a little bit more information from the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 14:43:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/511982#M15796</guid>
      <dc:creator>petermoolenaar</dc:creator>
      <dc:date>2018-09-10T14:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: "Operation is not supported for selector" when using "Update datasources" RE</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/681639#M19273</link>
      <description>&lt;P&gt;I am facing the same exact issue right now. Did you get any traction??&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/11689"&gt;@v-ljerr-msft&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/81087"&gt;@petermoolenaar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 13:54:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/681639#M19273</guid>
      <dc:creator>TexasBI</dc:creator>
      <dc:date>2019-05-01T13:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: "Operation is not supported for selector" when using "Update datasources" RE</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/682523#M19295</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/26630"&gt;@TexasBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eventually, support (after some escallation) was able to provide more details and (if memory serves me right) it turned out to be a column which combined (joined) information from tables. The documentation tells that combining information from different sources might be a problem, but apparantly any join could prove to be giving issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 13:50:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/682523#M19295</guid>
      <dc:creator>petermoolenaar</dc:creator>
      <dc:date>2019-05-02T13:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: "Operation is not supported for selector" when using "Update datasources" RE</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/1020497#M23066</link>
      <description>&lt;P&gt;I am geeting the same error when I select&amp;nbsp;&lt;SPAN&gt;Update all datasources in workspace.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2020 05:18:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-using/m-p/1020497#M23066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-11T05:18:49Z</dc:date>
    </item>
  </channel>
</rss>

