Get-PowerBIActivityEvent - I am unauthorized to run the cmdlet

T Crha 381 Reputation points
2022-09-23T07:47:31.143+00:00

Hello,
I need to extract some data about PowerBI usage in our tenant, which I intend to get by running Get-PowerBIActivityEvent cmdlet in powershell.
Problem is that when I run it, it ends with following error:

Get-PowerBIActivityEvent -StartDateTime '2022-08-31T00:00:00' -EndDateTime '2022-09-07T23:59:59'  
Get-PowerBIActivityEvent : Operation returned an invalid status code 'Unauthorized'  
At line:1 char:1  
+ Get-PowerBIActivityEvent -StartDateTime '2022-08-31T00:00:00' -EndDat ...  
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : WriteError: (Microsoft.Power...BIActivityEvent:GetPowerBIActivityEvent) [Get-PowerBIActivityEvent], HttpOp  
   erationException  
    + FullyQualifiedErrorId : Operation returned an invalid status code 'Unauthorized',Microsoft.PowerBI.Commands.Admin.GetPowerBIActivi  
   tyEvent  

I running the PS session with Global admin/PowerBI admin rights, yet I am being stopped by this error.
Anyone has a clue what rights I may be missing?

Thank you very much,
Tomas

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,428 questions
0 comments No comments
{count} votes