Forum Discussion
Running Get-PowerBIActivityEvent using registered app as service principal
To access the Power BI activity log, you need to have the "Read activity log" application permission. This permission allows you to view activity log events for all workspaces in your Power BI tenant.
To add the "Read activity log" permission to your app, you need to perform the following steps:
- Go to the Azure Active Directory (AAD) portal for your tenant.
- Find your app registration and click on it.
- Click on API permissions.
- Click on Add a permission.
- Select Microsoft Power BI service from the API list.
- Under Delegated Permissions, select "Read activity log" and click on Add permissions.
- Click on Grant admin consent to grant consent for the tenant administrator.
Once you have added the "Read activity log" permission to your app, you should be able to run the Get-PowerBIActivityEvent command successfully.
It is important to note that you may need to sign out and sign back in to your Power BI session to refresh the token with the updated permissions.
Hi jaweher899,
Thanks for your response. I'd love to check this out, however, since yesterday, I've encountered an issue where I can't get the app registration page. It's stuck on the 3 dots permanently. Baffling as all other pages work.
Hopefully this is a blip.
I've worked in the app registration page before and not come across this particular api permission when adding others under power bi service. Is it new?
Edit:
Just to give an update, I have not been able to see this api permission under the Power BI Service, either for delegated or application options.