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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors