<?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: Unable to access any Power BI API using VSCode Rest Client without getting a 403 error in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357943#M58960</link>
    <description>&lt;P&gt;Thank you, that is something to look at, even just to see APIs are accessible.&lt;BR /&gt;&lt;BR /&gt;This is more about how to learn the API behavior so we can automate later in an app etc.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2025 00:07:35 GMT</pubDate>
    <dc:creator>IainColledge</dc:creator>
    <dc:date>2025-01-10T00:07:35Z</dc:date>
    <item>
      <title>Unable to access any Power BI API using VSCode Rest Client without getting a 403 error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357637#M58956</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be greatful for any help on a problem we have, we're wanting to use Power BI Embedded but to prototype the calls we're using the Rest Client extension in VSCode.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We have a service principle set up, this successful calls the APIs under&amp;nbsp;graph.microsoft.com and&amp;nbsp;management.azure.com by getting an azure AD V2 token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This service principle will not be using delegated authorisation. It's been set up in a security group (PowerBiGroup) as per instructions.&lt;BR /&gt;&lt;BR /&gt;Under Power BI we have a PPU user as an admin user and in the Power BI admin portal they have enabled:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Tenant settings -&amp;gt; Developer -&amp;gt; Embed content in apps -&amp;gt; PowerBiGroup&lt;/LI&gt;&lt;LI&gt;Tenant settings -&amp;gt; Developer -&amp;gt; Service principles can use Fabric APIs&amp;nbsp;-&amp;gt; PowerBiGroup&lt;/LI&gt;&lt;LI&gt;Tenant settings -&amp;gt; Developer -&amp;gt; Allow service principals to create and use profiles -&amp;gt; PowerBiGroup&lt;/LI&gt;&lt;LI&gt;Tenant settings -&amp;gt; Admin API settings -&amp;gt; Service principals can access read-only admin APIs -&amp;gt; PowerBiGroup&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;There is a workspace and the PowerBiGroup have been added as an admin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Despite these settings I can auth fine, get a bearer token but every API call I make fails with a 403, I've tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;GET &lt;A href="https://api.powerbi.com/v1.0/myorg/groups" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;GET &lt;A href="https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=dashboards&amp;amp;$top=100" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/admin/groups?$expand=dashboards&amp;amp;$top=100&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;POST &lt;A href="https://api.powerbi.com/v1.0/myorg/RefreshUserPermissions" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/RefreshUserPermissions&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;GET &lt;A href="https://api.powerbi.com/v1.0/myorg/profiles" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/profiles&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;GET &lt;A href="https://api.powerbi.com/v1.0/myorg/reports" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/reports&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;GET &lt;A href="https://api.powerbi.com/v1.0/myorg/availableFeatures" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/availableFeatures&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;POST &lt;A href="https://api.powerbi.com/v1.0/myorg/profiles" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/profiles&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Using the format:&lt;BR /&gt;&lt;BR /&gt;GET &lt;A href="https://api.powerbi.com/v1.0/myorg/groups" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups&lt;/A&gt;&lt;BR /&gt;Authorization: bearer {{$aadV2Token appOnly}}&lt;BR /&gt;&lt;BR /&gt;Apart from the MS documentation and various posts out there I've also watched this tutorial&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=3RidKdK2KOM" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=3RidKdK2KOM&lt;/A&gt;&amp;nbsp;as well as cloned the github repo to show various calls.&lt;BR /&gt;&lt;BR /&gt;Please can anoyone help as this is very frustrating as we eventually want to use Power BI embedded for customers but have spent a long time trying to get service principles to work in any capacity.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 Jan 2025 17:30:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357637#M58956</guid>
      <dc:creator>IainColledge</dc:creator>
      <dc:date>2025-01-09T17:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access any Power BI API using VSCode Rest Client without getting a 403 error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357938#M58959</link>
      <description>&lt;P&gt;Have you considered using ready made tools?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.gbrueckl.at/2024/05/release-of-power-bi-studio-v2-0-vscode-extension/" target="_blank"&gt;Release of Power BI Studio v2.0 (VSCode extension) – Gerhard Brueckl on BI &amp;amp; Data&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 23:42:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357938#M58959</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-01-09T23:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access any Power BI API using VSCode Rest Client without getting a 403 error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357943#M58960</link>
      <description>&lt;P&gt;Thank you, that is something to look at, even just to see APIs are accessible.&lt;BR /&gt;&lt;BR /&gt;This is more about how to learn the API behavior so we can automate later in an app etc.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 00:07:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4357943#M58960</guid>
      <dc:creator>IainColledge</dc:creator>
      <dc:date>2025-01-10T00:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access any Power BI API using VSCode Rest Client without getting a 403 error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4359159#M58968</link>
      <description>&lt;P&gt;Power BI studio works with a local Power BI user.&lt;BR /&gt;&lt;BR /&gt;Delegated API calls work as well.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 16:42:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4359159#M58968</guid>
      <dc:creator>IainColledge</dc:creator>
      <dc:date>2025-01-10T16:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access any Power BI API using VSCode Rest Client without getting a 403 error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4361298#M58984</link>
      <description>&lt;P&gt;Found the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;GET&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api.powerbi.com/v1.0/myorg/groups&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Authorization: bearer {{$aadV2Token appOnly}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Should be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;GET&amp;nbsp;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api.powerbi.com/v1.0/myorg/groups&lt;/A&gt;&lt;BR /&gt;Authorization: Bearer {{$aadV2Token appOnly}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The other Azure REST APIs don't complain with using "bearer", the Power BI APIs fail without "Bearer".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 10:30:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-access-any-Power-BI-API-using-VSCode-Rest-Client/m-p/4361298#M58984</guid>
      <dc:creator>IainColledge</dc:creator>
      <dc:date>2025-01-13T10:30:03Z</dc:date>
    </item>
  </channel>
</rss>

