This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
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?
Is Microsoft just completely ignoring this issue?? I am having the same problem. @Alex_Stevenson did you figure out your issue?
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |