<?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: How to create PBI API Authorization header from AppID and Secret? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1687259#M28067</link>
    <description>&lt;P&gt;I figured it out. My client_secret had both a "+" and a "=" in it. I had to use the Flow action of encodeUriComponent.&amp;nbsp;&lt;BR /&gt;Sweet!&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 17:51:24 GMT</pubDate>
    <dc:creator>ericOnline</dc:creator>
    <dc:date>2021-02-24T17:51:24Z</dc:date>
    <item>
      <title>How to create PBI API Authorization header from AppID and Secret?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1681597#M28021</link>
      <description>&lt;P&gt;I'm trying to use the &lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/reports/exporttofile" target="_self"&gt;PBI API to export reports&lt;/A&gt; to .png. I followed the docs to get an app registered in Azure and received an App ID and Secret.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How do I create the Authorization header for API request using AppID and Secret?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The only examples I've been able to find all use C# or Java to create a "token". I don't have these tools at my disposal. Need an alternative, preferrably also using REST API of some sort.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 17:35:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1681597#M28021</guid>
      <dc:creator>ericOnline</dc:creator>
      <dc:date>2021-02-22T17:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create PBI API Authorization header from AppID and Secret?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1685613#M28053</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="87233" data-lia-user-login="ericOnline" class="lia-mention lia-mention-user"&gt;ericOnline&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to the links.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=fjzmz0BNN_g" target="_blank" rel="noopener"&gt;How to Call Power BI Rest APIs from Power BI Desktop – Register your Power BI Application – Part One - YouTube&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=N8qYRSqRz84" target="_blank" rel="noopener"&gt;Call Power BI Rest API with Dynamic Access Token From Power BI Desktop |Power BI Rest API | Part Two - YouTube&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 07:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1685613#M28053</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2021-02-24T07:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create PBI API Authorization header from AppID and Secret?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1687219#M28065</link>
      <description>&lt;P&gt;Thank you for the resources. I've read through them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My challenge is trying to access the PBI REST API from&amp;nbsp;&lt;EM&gt;outside&lt;/EM&gt; PowerBI (from Power Automate in this case).&amp;nbsp; In the video example you shared, the person is using the Client_ID from their Azure registered app along with &lt;EM&gt;their own Username and Password&lt;/EM&gt; to generate an access token.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will not work in my case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to generate a &lt;A href="https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow#first-case-access-token-request-with-a-shared-secret" target="_self"&gt;token with Client_ID and Client_Secret&lt;/A&gt;. &lt;STRONG&gt;How is this done?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The error I'm receiving is Invalid Client Secret (though I've checked and double checked that the secret is correct):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "error": "invalid_client",
  "error_description": "AADSTS7000215: Invalid client secret is provided.\r\nTrace ID: 947ff77d-fc36-480d-a58c-011c126e7400\r\nCorrelation ID: 2af5df99-2ff6-41cb-a094-ca7d5750ef99\r\nTimestamp: 2021-02-24 17:30:39Z",
  "error_codes": [
    7000215
  ],
  "timestamp": "2021-02-24 17:30:39Z",
  "trace_id": "947ff77d-fc36-480d-a58c-011c126e7400",
  "correlation_id": "2af5df99-2ff6-41cb-a094-ca7d5750ef99",
  "error_uri": "https://login.microsoftonline.com/error?code=7000215"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 18:48:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1687219#M28065</guid>
      <dc:creator>ericOnline</dc:creator>
      <dc:date>2021-02-25T18:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create PBI API Authorization header from AppID and Secret?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1687259#M28067</link>
      <description>&lt;P&gt;I figured it out. My client_secret had both a "+" and a "=" in it. I had to use the Flow action of encodeUriComponent.&amp;nbsp;&lt;BR /&gt;Sweet!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 17:51:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1687259#M28067</guid>
      <dc:creator>ericOnline</dc:creator>
      <dc:date>2021-02-24T17:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create PBI API Authorization header from AppID and Secret?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1690369#M28094</link>
      <description>&lt;P&gt;Following up here... the request I created above successfully returns a token, however the token is rejected when make a call to PowerBI REST API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Why could that be?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 18:46:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-create-PBI-API-Authorization-header-from-AppID-and-Secret/m-p/1690369#M28094</guid>
      <dc:creator>ericOnline</dc:creator>
      <dc:date>2021-02-25T18:46:36Z</dc:date>
    </item>
  </channel>
</rss>

