The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi there,
I have a registered app that I want to use in a few scenarios.
One being as follow to access the Power BI activity log:
Using powershell login/connect as service principal.
>Connect-PowerBIServiceAccount -ServicePrincipal -Credential $credentials -Tenant $TenantId
The above part is successful. As a test I can use Get-PowerBIWorkspace and it returns what I expect. This is in terms of the SP has been added as admin to a number of workspaces amd those are returned in the result.
However if I run:
>Get-PowerBIActivityEvent
I get the error:
Get-PowerBIActivityEvent : Operation returned an invalid status code 'Unauthorized'
For the above scenerio, do I require delegated or application permission in the registered app?
I am aware that it will be down to not having the correct permissions. I should be able to resolve this with the right request.
However, I'm not sure which one would apply with the above. Will delegated work? Or do I need application permissions?
Appreciate any help on this.
Thanks
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:
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.