<?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 Update the parameter while using service principal with certificate in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4174462#M55664</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to update the dataset parameters using update parameter api. But i'm unable to do it:&lt;/P&gt;&lt;P&gt;below is the code mockup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var credentialDetails = new UpdateDatasourceRequest();&lt;/P&gt;&lt;P&gt;var oAuthTokenData = new CredentialData&lt;BR /&gt;{&lt;BR /&gt;credentialData = new List&amp;lt;Credential&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;new Credential { Name = "accessToken", Value =GetSQLAccessToken().Result.ToString()}&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;credentialDetails.CredentialDetails = new CredentialDetails&lt;BR /&gt;{&lt;BR /&gt;CredentialType = "OAuth2",&lt;BR /&gt;Credentials = JsonConvert.SerializeObject(oAuthTokenData),&lt;BR /&gt;EncryptedConnection = "Encrypted",&lt;BR /&gt;EncryptionAlgorithm = "None",&lt;BR /&gt;PrivacyLevel = "None"&lt;/P&gt;&lt;P&gt;};&lt;BR /&gt;var getDatasources = pbiClient.Datasets.GetDatasourcesInGroup(workspaceId, pbiReport.DatasetId);&lt;BR /&gt;var refreshRequested = new RefreshRequest&lt;BR /&gt;{&lt;BR /&gt;NotifyOption = NotifyOption.NoNotification&lt;BR /&gt;};&lt;BR /&gt;if (getDatasources.Value.Count &amp;gt; 0)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;pbiClient.Datasets.TakeOver(workspaceId, pbiReport.DatasetId);&lt;BR /&gt;await pbiClient.Gateways.UpdateDatasourceAsync((Guid)getDatasources.Value[0].GatewayId, (Guid)getDatasources.Value[0].DatasourceId, credentialDetails);&lt;BR /&gt;await pbiClient.Datasets.UpdateParametersInGroupAsync(workspaceId, datasetIds.FirstOrDefault().ToString(), updateRequest);&lt;BR /&gt;await pbiClient.Datasets.RefreshDatasetAsync(workspaceId, datasetIds.FirstOrDefault().ToString(), refreshRequested);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how ever i'm unable to perform&amp;nbsp;UpdateDatasourceAsync .Why i'm using this is because to refresh the dataset , i need to use this method&amp;nbsp; here i'm facing the issue and it returning the bad request. i'm using the SQL Acces token for the crendentials. Is there any way to update the parameter . please let us know&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 13:17:01 GMT</pubDate>
    <dc:creator>kulandai</dc:creator>
    <dc:date>2024-09-25T13:17:01Z</dc:date>
    <item>
      <title>Update the parameter while using service principal with certificate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4174462#M55664</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to update the dataset parameters using update parameter api. But i'm unable to do it:&lt;/P&gt;&lt;P&gt;below is the code mockup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var credentialDetails = new UpdateDatasourceRequest();&lt;/P&gt;&lt;P&gt;var oAuthTokenData = new CredentialData&lt;BR /&gt;{&lt;BR /&gt;credentialData = new List&amp;lt;Credential&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;new Credential { Name = "accessToken", Value =GetSQLAccessToken().Result.ToString()}&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;credentialDetails.CredentialDetails = new CredentialDetails&lt;BR /&gt;{&lt;BR /&gt;CredentialType = "OAuth2",&lt;BR /&gt;Credentials = JsonConvert.SerializeObject(oAuthTokenData),&lt;BR /&gt;EncryptedConnection = "Encrypted",&lt;BR /&gt;EncryptionAlgorithm = "None",&lt;BR /&gt;PrivacyLevel = "None"&lt;/P&gt;&lt;P&gt;};&lt;BR /&gt;var getDatasources = pbiClient.Datasets.GetDatasourcesInGroup(workspaceId, pbiReport.DatasetId);&lt;BR /&gt;var refreshRequested = new RefreshRequest&lt;BR /&gt;{&lt;BR /&gt;NotifyOption = NotifyOption.NoNotification&lt;BR /&gt;};&lt;BR /&gt;if (getDatasources.Value.Count &amp;gt; 0)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;pbiClient.Datasets.TakeOver(workspaceId, pbiReport.DatasetId);&lt;BR /&gt;await pbiClient.Gateways.UpdateDatasourceAsync((Guid)getDatasources.Value[0].GatewayId, (Guid)getDatasources.Value[0].DatasourceId, credentialDetails);&lt;BR /&gt;await pbiClient.Datasets.UpdateParametersInGroupAsync(workspaceId, datasetIds.FirstOrDefault().ToString(), updateRequest);&lt;BR /&gt;await pbiClient.Datasets.RefreshDatasetAsync(workspaceId, datasetIds.FirstOrDefault().ToString(), refreshRequested);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how ever i'm unable to perform&amp;nbsp;UpdateDatasourceAsync .Why i'm using this is because to refresh the dataset , i need to use this method&amp;nbsp; here i'm facing the issue and it returning the bad request. i'm using the SQL Acces token for the crendentials. Is there any way to update the parameter . please let us know&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 13:17:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4174462#M55664</guid>
      <dc:creator>kulandai</dc:creator>
      <dc:date>2024-09-25T13:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update the parameter while using service principal with certificate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4175470#M55681</link>
      <description>&lt;P&gt;does it work in the sandbox?&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-parameters-in-group" target="_blank"&gt;Datasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 17:59:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4175470#M55681</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-09-25T17:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update the parameter while using service principal with certificate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4208562#M57010</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying&amp;nbsp; to take over the dataset for update parameter, but however while taking over dataset credentials for that dataset is getting lost. So is there is any way to take over the dataset without credentials being lost.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 13:16:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4208562#M57010</guid>
      <dc:creator>kulandai</dc:creator>
      <dc:date>2024-10-01T13:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Update the parameter while using service principal with certificate</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4208569#M57012</link>
      <description>&lt;P&gt;No, that's how this is designed, and (to me) it makes sense. Prevents unauthorized access and data loss.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 13:19:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-the-parameter-while-using-service-principal-with/m-p/4208569#M57012</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-01T13:19:26Z</dc:date>
    </item>
  </channel>
</rss>

