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 Anonymous ,
I wanted to check if you had the opportunity to review the information provided.If the response has addressed your query, please accept it as a solution, so other members can easily find it.
Thank you.
Hi v-venuppu ,
Thank you for your response and giving me some tips! I tried the steps you mentioned but they didn't give me the 200OK for getactivityevents API. I tried going the delegated permissions route and gave it tenant.read.all and write.all and kept everything else same as I mentioned up there and it worked and now I am getting all of the events for a day! Thank you for providing a repsonse and give me some tips to try out. Would you know if there is a way to get more then one days worth of views metrics from that call or we can only get one day and there is some other work around we have to do?