Forum Discussion
Anonymous
4 years agoNot applicable
[Powershell] Get workspaces for specified group of users
Hello, I am looking for some solution that allows me to find all workspaces where a specified group of users has access. So first, I prepare the list of such users in the variable, and then I wou...
- 4 years ago
Hi Anonymous ,
As far as I am concerned,You can get a list of users who have access to the App Workspace, but you will not be able to find users who have access via Workspace.
You can use the following Power BI REST API to find out details in Workspaces then loop through all your app workspaces to find the details:
Hope this sample script may help you:
Login-PowerBIServiceAccount Get-PowerBIWorkspace -Scope Organization -All | ForEach-Object { $Workspace = $_.name $WorkspaceId = $_.Id $IsOnDedicatedCapacity = $_.isOnDedicatedCapacity $State = $_.state $Type = $_.type $Capacityid = $_.CapacityId foreach ($User in $_.Users) { [PSCustomObject]@{ Workspace = $Workspace WorkspaceId = $WorkspaceId IsOnDedicatedCapacity = $IsOnDedicatedCapacity State = $State Type = $Type CapcityId = $Capacityid User = $User.accessright Identifier =$user.Identifier} }} | Export-CSV "C:\xxxxx\Workspace-UserAccess.csv" -NoTypeInformationBest Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
4 years agoSuper User
Might be easier to ask your tenant admin for the respective inventory logs (WorkspacesUsers).