Forum Discussion
Unauthorized 401 API powerbi admin activity events
- 1 year ago
Hi Anonymous ,
No, the GetActivityEvents API only supports retrieving one day of data per request.You cannot get multiple days in a single call.
As a Workaround to get more than one day of metrics, you need to call the API repeatedly, once per day, using different startDateTime and endDateTime values for each date.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly.
Thank you.
- Anonymous1 year ago
Hey VE I made a python script to loop over the api call to get all events for the past 30 days as you can make 200 api calls in an hour so I am following that process and ingesting my data into azure sql db! Thank you for your help!
Hi v-venuppu Anonymous
I tried all the above steps,
- Created an app in Azure Entra
- Assigned Tenant.Read.All, write all roles
- Created Secret
- Created a security group for the Service Principal
- Added Service Principal to Fabric Admin role
- Added the newly created security group in the tenant settings in Power BI admin portal
but still getting 401 error. Any suggestions on how to fix it??
Note: I'm able to access workspace & reports but not able to access activity events