Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Power BI activity and usage metrics

I am trying to get all my power bi tentants usage metrics and activity events. I am trying to use in powershell the command Get-PowerBIActivityEvent but I am getting an unathourized error message. Our company is very large so they won't make me an admin of the tenant BUT they will give me the following permissions to a service pricipal account (see image below). I also have tenant read.all and tenant.readwrite.all permissions assigned to this service principal account. From the research i've done if you have the office 365 Management APIs then you should be able to get usage metrics and activities using this or another API and Powershell? Any help is greatly appreciated. Are there other permissions I need my service pricipal account to have? 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    Permissions

    • The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) or authenticate using a service principal.
    • Delegated permissions are supported.

    When running under service prinicipal authentication, an app must not have any admin-consent required permissions for Power BI set on it in the Azure portal.

     

    So According to your statement, I think you use service principal to authenticate, please remove all admin-consent required permissions in Azure portal.

     

    For reference:

    Admin - Get Activity Events

     

    You may refer to this offical blog to learn how to configure a service principal.

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Permissions

    • The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) or authenticate using a service principal.
    • Delegated permissions are supported.

    When running under service prinicipal authentication, an app must not have any admin-consent required permissions for Power BI set on it in the Azure portal.

     

    So According to your statement, I think you use service principal to authenticate, please remove all admin-consent required permissions in Azure portal.

     

    For reference:

    Admin - Get Activity Events

     

    You may refer to this offical blog to learn how to configure a service principal.

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.