<?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 PowerBI UpdateDatasource Credentials OData not working with REST APIs in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-UpdateDatasource-Credentials-OData-not-working-with-REST/m-p/1531726#M26677</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to update the data source's credentials of an uploaded PowerBI report via the REST API, but the credentials are still the ones that the report is uploaded with.&lt;/P&gt;&lt;P&gt;After uploading the report via the&amp;nbsp;&lt;STRONG&gt;PostImportWithFileAsyncInGroup&amp;nbsp;&lt;/STRONG&gt;I'm querying for the import with &lt;STRONG&gt;GetImportInGroupAsync&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm then calling&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\",\"value\":\"..\"},{\"name\":\"password\",\"value\":\"..\"}]}",
    "encryptedConnection": "NotEncrypted",
    "encryptionAlgorithm": "None",
    "privacyLevel": "Public",
    "useEndUserOAuth2Credentials": "False"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This call is returning 200, but the credentials are NOT changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1. There is no Gateway installed, I'm using the default GatewayId that comes with the dataset;&lt;/P&gt;&lt;P&gt;2. The new Dataset is owned by the Service Account which is used with the APIs;&lt;/P&gt;&lt;P&gt;3. To inspect the data source credentials, I need to go to app.powerbi.com and take ownership of the datasource.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why wouldn't the credentials update?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 19:34:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-12-03T19:34:26Z</dc:date>
    <item>
      <title>PowerBI UpdateDatasource Credentials OData not working with REST APIs</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-UpdateDatasource-Credentials-OData-not-working-with-REST/m-p/1531726#M26677</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to update the data source's credentials of an uploaded PowerBI report via the REST API, but the credentials are still the ones that the report is uploaded with.&lt;/P&gt;&lt;P&gt;After uploading the report via the&amp;nbsp;&lt;STRONG&gt;PostImportWithFileAsyncInGroup&amp;nbsp;&lt;/STRONG&gt;I'm querying for the import with &lt;STRONG&gt;GetImportInGroupAsync&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm then calling&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\",\"value\":\"..\"},{\"name\":\"password\",\"value\":\"..\"}]}",
    "encryptedConnection": "NotEncrypted",
    "encryptionAlgorithm": "None",
    "privacyLevel": "Public",
    "useEndUserOAuth2Credentials": "False"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This call is returning 200, but the credentials are NOT changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1. There is no Gateway installed, I'm using the default GatewayId that comes with the dataset;&lt;/P&gt;&lt;P&gt;2. The new Dataset is owned by the Service Account which is used with the APIs;&lt;/P&gt;&lt;P&gt;3. To inspect the data source credentials, I need to go to app.powerbi.com and take ownership of the datasource.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why wouldn't the credentials update?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 19:34:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-UpdateDatasource-Credentials-OData-not-working-with-REST/m-p/1531726#M26677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-03T19:34:26Z</dc:date>
    </item>
  </channel>
</rss>

