Forum Discussion

smjzahid's avatar
smjzahid
Helper V
6 years ago

How to retrieve Access Level and Licence type using PowerShell

Hi 

I want to know the level off access each user has and their license type as per below snip. We have created an Office365 security group and provided access to the Power BI reports and dashboards via this O365 groups.

The challenge part is how do I know what level of access each users has for eg are they (Member, Contributor, Viewer).

I need something outputted like as per below table. Is there a powershell cmdlet which can give me this or may be a GUI way of finding from the Power BI Service and seeking what level of access each user has.

Note: The O365 security group has more than 100 plus report consumers

 

UPNLicence TypeAccess
[email protected]Pro UserContributor
[email protected]Free UserViewer
[email protected]Pro UserAdmin
[email protected]Pro UserMember

4 Replies

  • Hi there

    You will need to use a combination of PowerShell commands to get this information

    For the Access to Groups you can use the following PowerShell command let

    https://api.powerbi.com/v1.0/myorg/admin/groups?%24top=5000&%24expand=users%2Cdashboards%2Creports%2Cdatasets

    The above will download all the details you need.

    In terms of finding out which licenses users have I am not sure what the PowerShell command let is, but there would be one which would allow you to find this out.
      • smjzahid's avatar
        smjzahid
        Helper V

        It throws the error as shown in below snip.

         

        Could you send me the powehsell cmdlet to retrieve a Accessrights column which is either set to (Admin, Contributor, member, Viewer)

         

        I appreciate your response.