Forum Discussion
smjzahid
6 years agoHelper V
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 dashboar...
GilbertQ
6 years agoSuper User
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.
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.
- smjzahid6 years agoHelper V
- smjzahid6 years agoHelper 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.
- GilbertQ6 years agoSuper UserHi there
You have to either access it via PowerShell or an application that can use a GET POST.
You can use this link below to see the Power BI REST API, and then click on Try it (At the top of the page) to see the output
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/groups_getgroupsasadmin#get-workspaces-with-datasets-expanded-(only-applicable-for-workspaces-in-the-new-workspace-experience)