Forum Discussion
get-powerbiworkspace permession
Hi, Anonymous
You can also try the following to get a list of members of the Power BI tenant workspace.
Try to use PowerShell:
Connect-PowerBIServiceAccount
$Workspaces = Get-PowerBIWorkspace -Scope Organization -All
$Workspaces |
ForEach-Object {
$Workspace = $_.name
foreach ($User in $_.Users) {
[PSCustomObject]@{
Workspace = $Workspace
User = $User.UserPrincipalName
}
}
} | Export-CSV "D:\\PowerBIGroupMembers.csv" -NoTypeInformation -Encoding UTF8
If the script above doesn't display users, try this:
Connect-PowerBIServiceAccount
$Workspaces = Get-PowerBIWorkspace -Scope Organization -All
$Workspaces |
ForEach-Object {
$Workspace = $_.name
foreach ($User in $_.Users) {
[PSCustomObject]@{
Workspace = $Workspace
User = $User.Identifier
}
}
} | Export-CSV "D:\\PowerBIGroupMembers.csv" -NoTypeInformation -Encoding UTF8
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
Thank you for your reply
The problem is im getting "Unauthorized" when i try to run :
Get-PowerBIWorkspace -Scope Organization -All
I have PowerBI admin role and also PowerBI service admin account .. so do i miss any more permession to run this command please ?
I ran your script and got this error :
Bets regards
Sam
- v-zhangti4 years ago
Community Support
Hi, Anonymous
You will also need the Power BI User admin privileges.
For more administrator privileges, please refer to the following link.
https://docs.microsoft.com/power-bi/admin/service-admin-administering-power-bi-in-your-organization
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- lbendlin4 years ago
Super User
see if you can run this in the sandbox
Admin - Groups GetGroupsAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Docs