<?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 Successful access_token not working when authorizing for REST API's in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2443957#M35401</link>
    <description>&lt;P&gt;Good day all.&amp;nbsp; Any insight on this issue would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have setup an app in Azure for the ability to consume Power BI data using REST API's.&amp;nbsp; Using Postman and am able to get access_token using grant_type=client_credentials, clientID, clientSecret and resource.&amp;nbsp; But when I attempt to use the access_token in my API calls with Authorization Bearer I am getting a 03 Forbidden error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this because of Federated Authentication?&amp;nbsp; If so, then it's weird that I can actually get the access_token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see the photos below illustrating the issue.&amp;nbsp; Your help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-04-07_10-05-28.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/696540i9F929564C9C8FC41/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-04-07_10-05-28.png" alt="2022-04-07_10-05-28.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-04-07_11-37-41.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/696541i9CEFDDA14320D470/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-04-07_11-37-41.png" alt="2022-04-07_11-37-41.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 15:41:11 GMT</pubDate>
    <dc:creator>mwade_cte1926</dc:creator>
    <dc:date>2022-04-07T15:41:11Z</dc:date>
    <item>
      <title>Successful access_token not working when authorizing for REST API's</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2443957#M35401</link>
      <description>&lt;P&gt;Good day all.&amp;nbsp; Any insight on this issue would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have setup an app in Azure for the ability to consume Power BI data using REST API's.&amp;nbsp; Using Postman and am able to get access_token using grant_type=client_credentials, clientID, clientSecret and resource.&amp;nbsp; But when I attempt to use the access_token in my API calls with Authorization Bearer I am getting a 03 Forbidden error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this because of Federated Authentication?&amp;nbsp; If so, then it's weird that I can actually get the access_token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see the photos below illustrating the issue.&amp;nbsp; Your help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-04-07_10-05-28.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/696540i9F929564C9C8FC41/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-04-07_10-05-28.png" alt="2022-04-07_10-05-28.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-04-07_11-37-41.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/696541i9CEFDDA14320D470/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-04-07_11-37-41.png" alt="2022-04-07_11-37-41.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2443957#M35401</guid>
      <dc:creator>mwade_cte1926</dc:creator>
      <dc:date>2022-04-07T15:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Successful access_token not working when authorizing for REST API's</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2449108#M35462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/376422"&gt;@mwade_cte1926&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I know that you are now using Service Principal as authentication method to get access token.&lt;/P&gt;
&lt;P&gt;1. Please check whether you have created a security group and enable the Power BI service admin settings for this security.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicoZhou_0-1649669874102.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/697856iAAB282D92ED35C45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RicoZhou_0-1649669874102.png" alt="RicoZhou_0-1649669874102.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Please check whether your service principal are the Member or Admin of the workspace.&lt;/P&gt;
&lt;P&gt;For more details, you may refer to this &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal" target="_self"&gt;offical blog&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 09:40:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2449108#M35462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-11T09:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Successful access_token not working when authorizing for REST API's</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2449834#M35467</link>
      <description>&lt;P&gt;Thanks so much&amp;nbsp;@Anonymous&lt;/a&gt; for responding.&amp;nbsp; I followed your suggestions with the security group and assigning the service principal.&amp;nbsp; However, I am still getting the same issue with the access token.&amp;nbsp; Here are my settings from my Azure App Reg and in Postman.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Azure App settings" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/698039iEE74A0D9F16F3037/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-04-11_10-05-04.png" alt="Azure App settings" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Azure App settings&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Replicated in Postman" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/698040iAA1D774B52D7E185/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-04-11_10-05-47.png" alt="Replicated in Postman" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Replicated in Postman&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 14:12:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Successful-access-token-not-working-when-authorizing-for-REST/m-p/2449834#M35467</guid>
      <dc:creator>mwade_cte1926</dc:creator>
      <dc:date>2022-04-11T14:12:28Z</dc:date>
    </item>
  </channel>
</rss>

