<?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: Problem with Refreshing Dataset after Parameter Change with Service Principal in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4305039#M58475</link>
    <description>&lt;P&gt;Your process is missing a step.&amp;nbsp; After a semantic model takeover all data source credentials are removed and need to be reapplied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group" target="_blank"&gt;Datasets - Update Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Nov 2024 01:32:21 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-11-28T01:32:21Z</dc:date>
    <item>
      <title>Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4304899#M58472</link>
      <description>&lt;P&gt;Hi PowerBI Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a few semantic models (sourced from AWS/GCS and not via. Gateway) that are not owned by Service Principal. My goal is to programmatically change some parameters that the semantic models are using and then apply the change, and these are the steps I took:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Take over the dataset from the original user to Service Principal. The Service Principal must the dataset owner to update the parameter. (&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/take-over-in-group" target="_blank" rel="noopener"&gt;endpoint&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Update the parameter of the dataset (&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-parameters" target="_blank" rel="noopener"&gt;endpoint&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Refresh the dataset to apply the parameter change to the dataset. (&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group" target="_blank" rel="noopener"&gt;endpoint&lt;/A&gt;)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fxs7576_02_0-1732746415507.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1207039iA40DADF56E71407F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fxs7576_02_0-1732746415507.png" alt="fxs7576_02_0-1732746415507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But on step 3, I always receive the following message, and most of the dataset settings are greyed out.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;"&lt;SPAN class=""&gt;It looks like scheduled refresh failed because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources."&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fxs7576_02_1-1732746566009.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1207040i250247BD1807F0F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fxs7576_02_1-1732746566009.png" alt="fxs7576_02_1-1732746566009.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Does anyone know another way to change and apply the new parameter using REST API, or solve the refresh issue on step 3 (maybe allowing Service Principal to refresh any semantic models regardless of the ownership in the workspace)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 22:33:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4304899#M58472</guid>
      <dc:creator>fxs7576_02</dc:creator>
      <dc:date>2024-11-27T22:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4305039#M58475</link>
      <description>&lt;P&gt;Your process is missing a step.&amp;nbsp; After a semantic model takeover all data source credentials are removed and need to be reapplied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group" target="_blank"&gt;Datasets - Update Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 01:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4305039#M58475</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-11-28T01:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4305900#M58482</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/765878"&gt;@fxs7576_02&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Base on your description, it&lt;SPAN&gt;&amp;nbsp;sounds like you're running into an issue with data source credentials after you update the parameters and try to refresh the dataset. Please check if the service principal hit the following &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-parameters-in-group#limitations" target="_self"&gt;limitations&lt;/A&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1732785911167.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1207405i8CEB1CF5535994B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1732785911167.png" alt="vyiruanmsft_0-1732785911167.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In addition, the following link is the one which has the similar problem as yours. Hope its solution can help you solve the problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Service/Dataset-refresh-error-Service-principal/m-p/1078969" target="_blank"&gt;Solved: Dataset refresh error Service principal - Microsoft Fabric Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 09:25:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4305900#M58482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-28T09:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4306327#M58485</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;After the 'Takeover Dataset' step, I tried the Datasources Update endpoint&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/datasets/{dataset_id}/Default.UpdateDatasources" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/datasets/{dataset_id}/Default.UpdateDatasources&lt;/A&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;with the following request body:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
    'updateDetails': [
        {'datasourceSelector':
         {
             'datasourceType': 'MySql',
             'connectionDetails': {
                 'server': 'demo_server_01',
                 'database': 'demo_database_01'
            }
         },
         'connectionDetails': {
             'server': 'demo_server_01',
             'database': 'demo_database_01'
         }
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But received the following message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"error":{"code":"InvalidRequest","message":"The given connection details for selector # are invalid"}}&lt;/PRE&gt;&lt;P&gt;Is there any information in the request body that I need to add or modify?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 14:06:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4306327#M58485</guid>
      <dc:creator>fxs7576_02</dc:creator>
      <dc:date>2024-11-28T14:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4306351#M58486</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think the Service Principal is facing those limitations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I looked at the solution in&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Service/Dataset-refresh-error-Service-principal/m-p/1078969" target="_blank" rel="noopener"&gt;Solved: Dataset refresh error Service principal - Microsoft Fabric Community&lt;/A&gt;&amp;nbsp;thread, they used the endpoint to update the datasource credential for Gateway.&lt;/P&gt;&lt;PRE&gt;$BounGateway=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.GetBoundGatewayDataSources" -Method GET | ConvertFrom-Json&lt;/PRE&gt;&lt;P&gt;I'm not yet familiar with gateway connection. Is the above endpoint still relevant if I use a personal cloud connection (i.e. RDS MySQL) as opposed to gateway?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 14:36:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4306351#M58486</guid>
      <dc:creator>fxs7576_02</dc:creator>
      <dc:date>2024-11-28T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4362029#M58997</link>
      <description>&lt;P&gt;Did you ever manage to find the solution to this?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 18:52:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4362029#M58997</guid>
      <dc:creator>LJonesStripe</dc:creator>
      <dc:date>2025-01-13T18:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4802719#M62775</link>
      <description>&lt;P&gt;Any solution for this?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 18:14:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4802719#M62775</guid>
      <dc:creator>jbauti10</dc:creator>
      <dc:date>2025-08-20T18:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4803428#M62785</link>
      <description>&lt;P&gt;I raised an MS support ticket which made it through to the PowerBI 3rd line support team.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was told this API endpoint is not actually designed for updating to a connection that already exists and there is currently no endpoint available for it. Which seems wild to me, it seems like exactly what it's for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I gave up in the end&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 09:24:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4803428#M62785</guid>
      <dc:creator>LJonesStripe</dc:creator>
      <dc:date>2025-08-21T09:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4803607#M62789</link>
      <description>&lt;P&gt;I would recommend you raise a DCR.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 11:23:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4803607#M62789</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-08-21T11:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4807292#M62837</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/380200"&gt;@LJonesStripe&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1339346"&gt;@jbauti10&lt;/a&gt;&amp;nbsp;, apology for the super late response on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to find the solution to this using the following process:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a gateway, and save its gateway_id.&lt;/LI&gt;&lt;LI&gt;Take over the dataset from the original user to Service Principal. The Service Principal must the dataset owner to update the parameter. (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/take-over-in-group" target="_blank" rel="noopener nofollow noreferrer"&gt;endpoint&lt;/A&gt;)&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Update the parameter of the dataset (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-parameters" target="_blank" rel="noopener nofollow noreferrer"&gt;endpoint&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Get the data source from the dataset, and retrieve its [gatewayId] (GET &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources-in-group" target="_blank" rel="noopener"&gt;endpoint&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;If the gateway_id from step #1 is not the same as that from step #4, run this POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/bind-to-gateway" target="_blank" rel="noopener"&gt;endpoint&lt;/A&gt;&amp;nbsp;to bind the gateway. &amp;lt;--- For some reason this is required. Not sure why yet.&lt;/LI&gt;&lt;LI&gt;Refresh the dataset to apply the parameter change to the dataset. (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group" target="_blank" rel="noopener nofollow noreferrer"&gt;endpoint&lt;/A&gt;)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Let me know if it works on your end.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 19:50:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4807292#M62837</guid>
      <dc:creator>fxs7576_02</dc:creator>
      <dc:date>2025-08-25T19:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Refreshing Dataset after Parameter Change with Service Principal</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4808586#M62853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/765878"&gt;@fxs7576_02&lt;/a&gt;,&amp;nbsp;thanks for your response!&lt;BR /&gt;&lt;BR /&gt;Unfortunately, it still doesn't work for me.&amp;nbsp;My datasource is PostgreSQL on Azure. I don’t currently have any gateways set up in Power BI Service, since I assumed for cloud Postgres no gateway is needed, but I’m not sure if that’s wrong.&lt;BR /&gt;&lt;BR /&gt;Here's my process until now:&lt;BR /&gt;1. Get access token for service principal (I use the msal python library for this like in &lt;A href="https://github.com/microsoft/PowerBI-Developer-Samples" target="_self"&gt;this example&lt;/A&gt;).&lt;BR /&gt;2. Take over dataset with this endpoint (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/take-over-in-group" target="_self"&gt;endpoint&lt;/A&gt;).&lt;BR /&gt;3. Get gateway ID and datasource ID from the get datasource in group endpoint (GET&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources-in-group" target="_self"&gt;endpoint&lt;/A&gt;)&lt;BR /&gt;4. Update the parameters of the dataset (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-parameters-in-group" target="_self"&gt;endpoint&lt;/A&gt;)&lt;BR /&gt;5. Update datasource credentials (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-parameters-in-group" target="_self"&gt;endpoint&lt;/A&gt;) using the gateway ID and datasource ID I get after taking over the dataset. I include this step because when the refresh is triggered I get an error saying: "It looks like scheduled refresh failed because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources".&lt;BR /&gt;6. Refresh the dataset to apply the parameter changes. (POST &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group" target="_self"&gt;endpoint&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;The issue happens at step 5, I keep getting either:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"error":{"code":"InvalidRequest","message":"The given connection details for selector # are invalid"}}&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"error":{"code":"ItemNotFound","message":"Dataset doesn't contain a datasource that matches selector #1"}}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;In the update datasource credentials step. The two body requests I've been using are the following:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;body = {
    "updateDetails": [
        {
            "datasourceSelector": {
                "datasourceType": "PostgreSql",
                "connectionDetails": {
                    "server": settings.PG_AZURE_HOST,
                    "database": settings.PG_AZURE_DATABASE
                },
                "gatewayId": gatewayID,
                "datasourceId": datasourceID
            },
            "connectionDetails": {
                "server": settings.PG_AZURE_HOST,
                "database": settings.PG_AZURE_DATABASE
            },
            "credentialDetails": {
                "credentialType": "Basic",
                "credentials": json.dumps({
                    "username": settings.PG_AZURE_USER,
                    "password": settings.PG_AZURE_PASSWORD
                }),
                "encryptedConnection": "Encrypted",
                "privacyLevel": "Private"
            }
        }
    ]
}​&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;body = {
            "updateDetails": [
                {
                    "datasourceSelector": {
                        "dataSourceType": "PostgreSQL",
                        "gatewayId": gatewayID,
                        "datasourceId": datasourceID
                    },
                    "connectionDetails": {
                        "server": settings.PG_AZURE_HOST,
                        "database": settings.PG_AZURE_DATABASE
                    },
                    "credentialDetails": {
                        "credentialType": "Basic",
                        "credentials": json.dumps({
                            "username": settings.PG_AZURE_USER,
                            "password": settings.PG_AZURE_PASSWORD
                        }),
                        "encryptedConnection": "Encrypted",
                        "privacyLevel": "Private"
                    }
                }
            ]
        }&lt;/LI-CODE&gt;&lt;P&gt;but neither work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For Azure Postgres, do I need to set up a gateway in Power BI Service for this API call to succeed?&lt;/LI&gt;&lt;LI&gt;Is my datasourceSelector wrong (maybe I shouldn’t include datasourceType / connectionDetails)?&lt;/LI&gt;&lt;LI&gt;Or is there something else I’m missing in the credential update step?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;Any kind of help is hugely appreciated!&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2025 22:26:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-with-Refreshing-Dataset-after-Parameter-Change-with/m-p/4808586#M62853</guid>
      <dc:creator>jbauti10</dc:creator>
      <dc:date>2025-08-26T22:26:05Z</dc:date>
    </item>
  </channel>
</rss>

