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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

exporting List of Workspaces and all users to excel

Hello,

is there a way to export list of All work spaces and memebrs under those workspaces to excel

Currently there is an option in Power BI Admin Portal to export only Workspace ID name and descritpion 

I am also tyring to get all Member owners Id under worksapce.

 

Thanks

1 ACCEPTED SOLUTION
Icey
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

 

workspace.PNG

 

Reference: PowerBI Query – Trying to list workspaces and users.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
ahmadov_10
Helper II
Helper II

Hello Experts, i need to export the list of users (names, mails) for a specific Power BI Workspace using Power Shell (or other solution) to csv file , i give you my informations that i used in the script (that i replaced them with the correct informations , my email, password , workspace_id ) :

workspaceId : "my_workspace_id"

userName : 'my_user'

password : 'my_password'

csvFilePath : "C:\Users\my_file.csv"

i used many commands methods in powershell and not works , please if you have any solutions in powershell or others ?

AliceW
Impactful Individual
Impactful Individual

Accidentally found an answer just now.

Go in the workspace.

Click on the 'Access' icon (like you you when you add someone).

Then, anywhere in the page, right-click, Save As, then Save as type: Text Files.

You'll get a beautiful text file with the users and, the chery on the cake, their rights (Viewer, Contributor etc.).

Of course, this file also includes some other data, but you can just skip to the good parts.

 

 

Icey
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

 

workspace.PNG

 

Reference: PowerBI Query – Trying to list workspaces and users.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors