Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Alex_Stevenson
Regular Visitor

Power BI Rest admin endpoint permissions problem

I'm trying to use the power bi rest api admin endpoint: https://api.powerbi.com/v1.0/myorg/admin/activityevents


I'm using the authorization token generated by this other endpoint: https://login.microsoftonline.com/common/oauth2/token


This is my request body:

 

grant_type=password
&username=*************
&password=*************
&client_id=*************
&client_secret=*************
&resource=https://analysis.windows.net/powerbi/api

 

The token response looks like this:

 

{
"token_type": "Bearer",
"scope": "App.Read.All Capacity.Read.All Capacity.ReadWrite.All Content.Create Dashboard.Read.All Dashboard.ReadWrite.All Dataflow.Read.All Dataflow.ReadWrite.All Dataset.Read.All Dataset.ReadWrite.All Gateway.Read.All Gateway.ReadWrite.All Report.Read.All Report.ReadWrite.All StorageAccount.Read.All StorageAccount.ReadWrite.All Workspace.Read.All Workspace.ReadWrite.All",
"expires_in": "3599",
"ext_expires_in": "3599",
"expires_on": "1594202241",
"not_before": "1594198341",
"resource": "https://analysis.windows.net/powerbi/api",
"access_token": "eyJ0eXAiOi..."
"refresh_token": "0.ATAAsjCPS..."
}

 


The response scope attribute is not including Tenant.Read.All nor Tenant.ReadWrite.All even though I have added those API permissions and also granted admin consent for those permissions in the API permission azure console page.


Those permissions are required to be able to access the activityevents endpoint.


Can anyone point me to what I'm missing?


How can I get the Tenant.Read.All nor Tenant.ReadWrite.All permissions assigned to the scope of my authorization token?

1 REPLY 1
Anonymous
Not applicable

Is Microsoft just completely ignoring this issue?? I am having the same problem. @Alex_Stevenson  did you figure out your issue?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.