<?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: Get Activity Events API - PowerBINotAuthorizedException Error in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5196358#M65212</link>
    <description>&lt;P&gt;Such as simple solution, but exactly what I needed. I removed the Tenant.Read.All permission and it works perfectly! Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2026 23:11:04 GMT</pubDate>
    <dc:creator>JamieHut</dc:creator>
    <dc:date>2026-06-11T23:11:04Z</dc:date>
    <item>
      <title>Get Activity Events API - PowerBINotAuthorizedException Error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5195773#M65199</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I'm trying to get the report usage data out of the org's Power BI environment, but I keep running into this error: "&lt;SPAN&gt;PowerBINotAuthorizedException"&lt;BR /&gt;&lt;BR /&gt;In order to facilitate this I have registered an app in Entra ID, which has been granted "Tenant.Read.All" privileges for Power BI. I have added the app to a security group, and the security group has been enabled to acces Read-Only APIs in Power BI. The user account running the flow has also been added to the security group for good measure.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamieHut_1-1781133469151.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352033iA38239EC041FB582/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamieHut_1-1781133469151.png" alt="JamieHut_1-1781133469151.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamieHut_2-1781133683470.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352034i3545A46F0311CFF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamieHut_2-1781133683470.png" alt="JamieHut_2-1781133683470.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried in Power Automate and Postman, first generating a token, then trying to query the PBI API with said token, I get the same error in both cases.&amp;nbsp;&lt;BR /&gt;Here's the token generation, I am using our Tenant ID in the URI, client ID &amp;amp; secret from the app:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamieHut_0-1781133199168.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352032i91E873C7DC04C1AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamieHut_0-1781133199168.png" alt="JamieHut_0-1781133199168.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I then put that token into the HTTP call, which I have tried with and without parameters (i.e. filtering on username, specific days, either of the above or none of the above).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamieHut_3-1781134404162.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352035i32E6DAD44CC67D8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamieHut_3-1781134404162.png" alt="JamieHut_3-1781134404162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have also done this without the Get Token step, simply using the authentication in the advanced parameters of the HTTP step, which leads to the same error.&lt;BR /&gt;I've also additionally tried adding in both the user account that runs the flow and the service principal (app) itself as admins to all the workspaces on Power BI, which made no difference.&lt;BR /&gt;&lt;BR /&gt;Has anyone here encountered (&amp;amp; resolved) this issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The API documentation:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2026 23:39:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5195773#M65199</guid>
      <dc:creator>JamieHut</dc:creator>
      <dc:date>2026-06-10T23:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get Activity Events API - PowerBINotAuthorizedException Error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5196058#M65209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1604826"&gt;@JamieHut&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;,&lt;BR /&gt;Based on your description, it appears that the Entra ID application has been assigned the Power BI Tenant.Read.All application permission. For the Get Activity Events admin API, Microsoft requires that service principal authentication be enabled via the Power BI tenant settings, and that the service principal is included in the designated security group. However, the app registration should not have Power BI admin consent-required permissions like Tenant.Read.All or Tenant.ReadWrite.All. Instead, authorization is managed through the Power BI Admin Portal settings rather than through app registration permissions.&lt;BR /&gt;Please check if the access token you are generating is a service principal token by decoding the JWT and reviewing the claims. If so, remove Power BI application permissions from the app registration, allow time for the changes to take effect, generate a new token, and retest the API. Additionally, confirm that the service principal is part of the exact security group specified in the Power BI Admin Portal tenant settings.&amp;nbsp;Workspace Admin permissions are not relevant for this endpoint, as Get Activity Events is a tenant-level Admin API.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you are using delegated user authentication instead of a service principal, ensure the account has the Fabric Administrator or Power BI Service Administrator role as workspace permissions alone are insufficient for this API.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;For further information, please review the Microsoft documentation below&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/td-p/5195773" target="_blank"&gt;Get Activity Events API - PowerBINotAuthorizedExce... - Microsoft Fabric Community&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events?utm_source" target="_blank"&gt;Admin - Get Activity Events - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/enterprise/powerbi/service-premium-service-principal?utm_source" target="_blank"&gt;Automate Power BI Premium workspace and semantic model tasks with service principals - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow?utm_source" target="_blank"&gt;OAuth 2.0 client credentials flow on the Microsoft identity platform - Microsoft identity platform | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-admin-api-settings?utm_source" target="_blank"&gt;Admin API admin settings - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 11:52:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5196058#M65209</guid>
      <dc:creator>v-tejrama</dc:creator>
      <dc:date>2026-06-11T11:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get Activity Events API - PowerBINotAuthorizedException Error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5196358#M65212</link>
      <description>&lt;P&gt;Such as simple solution, but exactly what I needed. I removed the Tenant.Read.All permission and it works perfectly! Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 23:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Activity-Events-API-PowerBINotAuthorizedException-Error/m-p/5196358#M65212</guid>
      <dc:creator>JamieHut</dc:creator>
      <dc:date>2026-06-11T23:11:04Z</dc:date>
    </item>
  </channel>
</rss>

