<?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: Update DataSource parameter with API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723775#M49767</link>
    <description>&lt;P&gt;Did you delegate?&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 11:53:27 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-02-26T11:53:27Z</dc:date>
    <item>
      <title>Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3721957#M49745</link>
      <description>&lt;P&gt;I'm trying to update DataSource Parameters with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;string scope = "https://analysis.windows.net/powerbi/api/.default";

IConfidentialClientApplication app = ConfidentialClientApplicationBuilder.Create(clientId)
                .WithClientSecret(clientSecret)
                .WithAuthority(new Uri(authority))
                .Build();

string[] scopes = new string[] { scope };

AuthenticationResult result = null;
result = await app.AcquireTokenForClient(scopes).ExecuteAsync();

PowerBIClient pbiClient = new PowerBIClient(new Uri("https://api.powerbi.com/"), new TokenCredentials(result.AccessToken, "Bearer"));

var refds = await pbiClient.Datasets.UpdateParametersInGroupWithHttpMessagesAsync(_groupId, _datasetId, new UpdateMashupParametersRequest(new UpdateMashupParameterDetails("orgId", "98")));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get:&amp;nbsp;Operation returned an invalid status code 'Forbidden'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've turned on every possible setting in Tenant Settings in Power BI and Api privileges for App Registration in Azure.&lt;/P&gt;&lt;P&gt;I'm new, trying things out as Pro Licence without any reserverd capacity in Azure Power Bi Embedded - is that necessary?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 15:01:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3721957#M49745</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-25T15:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722063#M49746</link>
      <description>&lt;P&gt;take your token to jwt.io and examine the "scp"&amp;nbsp; (scope)&amp;nbsp; section.&amp;nbsp; Most likely the token is hollow.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 16:35:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722063#M49746</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-25T16:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722074#M49747</link>
      <description>&lt;P&gt;There is no scp section at all in the token. How can I fixed that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 16:50:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722074#M49747</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-25T16:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722389#M49751</link>
      <description>&lt;P&gt;go back to your app registration and ask for better permissions.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 00:52:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722389#M49751</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T00:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722871#M49755</link>
      <description>&lt;P&gt;I've already turned on in azure everything that is related to Power Bi for the app. Can you advise which specific permissions it needs ?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 05:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3722871#M49755</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-26T05:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723775#M49767</link>
      <description>&lt;P&gt;Did you delegate?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 11:53:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723775#M49767</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T11:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723780#M49768</link>
      <description>&lt;P&gt;Sorry, but what exactly do you mean by delegate?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 11:56:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723780#M49768</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-26T11:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723841#M49769</link>
      <description>&lt;P&gt;Have you asked for straight permissions or delegated permissions?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 12:19:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723841#M49769</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T12:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723914#M49770</link>
      <description>&lt;P&gt;I'm using app-only access, so no delegated permissions.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 12:38:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3723914#M49770</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-26T12:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3724091#M49787</link>
      <description>&lt;P&gt;this may help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/answers/questions/256281/microsoft-azure-ad-jwt-token-is-missing-scope-info" target="_blank"&gt;Microsoft Azure AD JWT Token is missing Scope information - Microsoft Q&amp;amp;A&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 13:46:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3724091#M49787</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T13:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3724127#M49789</link>
      <description>&lt;P&gt;Does this imply that I can only methods like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;UpdateParametersInGroupWithHttpMessagesAsync&lt;/PRE&gt;&lt;P&gt;only if I get user access token and cannot just use token quired using only applicattion secret?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 13:56:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3724127#M49789</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-26T13:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3724169#M49792</link>
      <description>&lt;P&gt;no scope = no worky&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 14:13:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3724169#M49792</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T14:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update DataSource parameter with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3727246#M49866</link>
      <description>&lt;P&gt;I've changed that now my user (which is admin in PowerBI) is used for fetching access token.&lt;/P&gt;&lt;P&gt;I can execute methods like&amp;nbsp;pbiClient.Datasets.GetDatasetsInGroup&lt;/P&gt;&lt;P&gt;But when executing&amp;nbsp;pbiClient.Datasets.UpdateParametersInGroupWithHttpMessagesAsync&lt;/P&gt;&lt;P&gt;I still get Forbidden result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Decrypted token in jwt.io still does not have scp.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 10:52:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Update-DataSource-parameter-with-API/m-p/3727246#M49866</guid>
      <dc:creator>udione</dc:creator>
      <dc:date>2024-02-27T10:52:20Z</dc:date>
    </item>
  </channel>
</rss>

