Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Power Bi Service Principal - accessing activity events

Hi All,

 

I am trying to access activity event of my tenant using PowerShell & Service Principal. I am using below cmdlet & it works with my personal account which is admin of the service:

Get-PowerBIActivityEvent -StartDateTime 2023-03-10T14:35:20 -EndDateTime 2019-08-10T16:35:20

 

On running above conmmand below error is displayed:

Get-PowerBIActivityEvent : Operation returned an invalid status code 'Forbidden'

 

I understand this could be ue to some access issue, if anybody has faced this issue - could you help me in fixing this? And may be silly(I am pretty new to Service Principal usage) but do I need to add this account as admin of the PBI service?

 

Quick Note - User is added in Service Principal Tenant setting through security group.

 

Thanks,

Max

No Replies