Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi ,
I have been trying to export all the workspaces and the list of users associated with the workpsace through Power shell.
Below is the code.
The code works fine and I am facing problem only when a AD group has been added to workspace. As long as the access has been given to individual users this code works fine and excel is generated with the list of users.But to those workspaces were groups are added in access tab it is just displaying groupid instead of group name .
Is there any possible workaround to display the group name along with individual users.
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:\\PowerBIReports.csv" -NoTypeInformation -Encoding UTF8
Solved! Go to Solution.
HI @NithyaKB,
According to your description, I think only using the power bi module may not be suitable for your scenario.
In my opinion, I'd like to suggest you add additional steps before exporting data to check current items and extract the group id to use ActiveDirectory/AzureAD related functions to handle them.
ActiveDirectory Module | Microsoft Docs
AzureAD Module | Microsoft Docs
Regards,
Xiaoxin Sheng
HI @NithyaKB,
According to your description, I think only using the power bi module may not be suitable for your scenario.
In my opinion, I'd like to suggest you add additional steps before exporting data to check current items and extract the group id to use ActiveDirectory/AzureAD related functions to handle them.
ActiveDirectory Module | Microsoft Docs
AzureAD Module | Microsoft Docs
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
3 |