Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Mapping of all the workspace and list of users and groups

Hey Everyone,

Is there any way to prepare a metadata sheet / master list / mapping sheet of all the workspaces and list of users and usergroups who have access to those workspaces.

Is there any api which can help in this scenario ?

 

Many thanks for any relevant input.

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

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

 

vluwangmsft_1-1648536340566.png

 

refer:

https://community.powerbi.com/t5/Developer/Powershell-Get-workspaces-for-specified-group-of-users/m-p/2188566 

 

Best Regards,

Lucien

 

 

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

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

 

vluwangmsft_1-1648536340566.png

 

refer:

https://community.powerbi.com/t5/Developer/Powershell-Get-workspaces-for-specified-group-of-users/m-p/2188566 

 

Best Regards,

Lucien

 

 

lbendlin
Super User
Super User

That is all part of the tenant inventory API. You need to be tenant admin to see these.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors