<?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 Getting 403 - API is not accessible for application when calling Power BI API Get Pages in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Getting-403-API-is-not-accessible-for-application-when-calling/m-p/3580578#M45745</link>
    <description>&lt;P&gt;I have registered an app (service principal) with&amp;nbsp;App.Read.All,&amp;nbsp;Report.Read.All and&amp;nbsp;Workspace.Read.All permissions. The app has member access to the four workspaces in need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works successfully. All reports are acquired for each workspace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET https://api.powerbi.com/v1.0/myorg/reports/{reportId}/pages&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get&amp;nbsp;403 - API is not accessible for application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/pages&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the page metadata for some reports and for others I get 401 (DENY) error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I test the above api call at the&amp;nbsp;Power BI REST APIs website with the failed report with my account it works. Mind you I only have view access to the reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing??? I don't understand why ...groups/{groupId}/reports/{reportId}/pages works for some reports and not others.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 20:39:33 GMT</pubDate>
    <dc:creator>GoodPanos</dc:creator>
    <dc:date>2023-12-12T20:39:33Z</dc:date>
    <item>
      <title>Getting 403 - API is not accessible for application when calling Power BI API Get Pages</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-403-API-is-not-accessible-for-application-when-calling/m-p/3580578#M45745</link>
      <description>&lt;P&gt;I have registered an app (service principal) with&amp;nbsp;App.Read.All,&amp;nbsp;Report.Read.All and&amp;nbsp;Workspace.Read.All permissions. The app has member access to the four workspaces in need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works successfully. All reports are acquired for each workspace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET https://api.powerbi.com/v1.0/myorg/reports/{reportId}/pages&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get&amp;nbsp;403 - API is not accessible for application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/pages&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the page metadata for some reports and for others I get 401 (DENY) error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I test the above api call at the&amp;nbsp;Power BI REST APIs website with the failed report with my account it works. Mind you I only have view access to the reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing??? I don't understand why ...groups/{groupId}/reports/{reportId}/pages works for some reports and not others.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 20:39:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-403-API-is-not-accessible-for-application-when-calling/m-p/3580578#M45745</guid>
      <dc:creator>GoodPanos</dc:creator>
      <dc:date>2023-12-12T20:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting 403 - API is not accessible for application when calling Power BI API Get Pages</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-403-API-is-not-accessible-for-application-when-calling/m-p/3580652#M45747</link>
      <description>&lt;P&gt;Resolved! Turns out that some of the reports had their datasource on another workspace. Once we granted access to those workspaces to the service principal account, the API calls ran successfully.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 22:11:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-403-API-is-not-accessible-for-application-when-calling/m-p/3580652#M45747</guid>
      <dc:creator>GoodPanos</dc:creator>
      <dc:date>2023-12-12T22:11:21Z</dc:date>
    </item>
  </channel>
</rss>

