Forum Discussion
Administration
- 1 year ago
WCJ - You will need use 3 APIs to get
1. Gets all workspaces2. Gets reports in each workspace - Loop for each worksapce above
3. Fetches direct report-level permissions - Loop for each report above
If you have Power BI Admin access then can use below powershell script# Connect to Power BI Service
Connect-PowerBIServiceAccount
# Get all workspaces
$workspaces = Get-PowerBIWorkspace -Scope Organization
# Initialize an array to store report details
$reportDetails = @()
foreach ($workspace in $workspaces) {
Write-Host "Processing Workspace: $($workspace.Name)"
# Get reports in the workspace
$reports = Get-PowerBIReport -WorkspaceId $workspace.Id
foreach ($report in $reports) {
Write-Host "Processing Report: $($report.Name)"
# Get users with workspace-level permissions
$workspacePermissions = Get-PowerBIWorkspaceUser -Id $workspace.Id
foreach ($permission in $workspacePermissions) {
$reportDetails += [PSCustomObject]@{
ReportName = $report.Name
ReportId = $report.Id
WorkspaceName = $workspace.Name
WorkspaceId = $workspace.Id
User = $permission.DisplayName
UserEmail = $permission.EmailAddress
AccessScope = "Workspace Level"
AccessRight = $permission.AccessRight
}
}
# Get users with direct report-level permissions
$reportPermissions = Get-PowerBIReportUser -WorkspaceId $workspace.Id -ReportId $report.Id
foreach ($permission in $reportPermissions) {
$reportDetails += [PSCustomObject]@{
ReportName = $report.Name
ReportId = $report.Id
WorkspaceName = $workspace.Name
WorkspaceId = $workspace.Id
User = $permission.DisplayName
UserEmail = $permission.EmailAddress
AccessScope = "Report Level"
AccessRight = $permission.AccessRight
}
}
}
}
# Export results to CSV
$reportDetails | Export-Csv -Path "PowerBI_Reports_Permissions.csv" -NoTypeInformation
Write-Host "Report details exported to PowerBI_Reports_Permissions.csv"
Hi WCJ,
Thank you for your question.
- After Navigating to Power BI Service → Click on the Settings → Select Admin Portal. Under the Workspaces section, you will see a list of all workspaces along with their details. In this view, you should also see an Export button at the top highlighted in the attached below screenshot.
- Clicking Export will allow you to download the workspace data to Excel for offline reference.
Important Note on Permissions:
The Export option is only visible if you have the appropriate permissions as a Power BI Admin (or Fabric Admin). If you do not see the Export button, it is likely that you do not have admin rights. You may need to check with your organization’s Power BI administrator to confirm your access level.
I trust this information proves useful. If it does, kindly Accept it as a solution and give it a 'Kudos' to help others locate it easily.
Thank you.
Hi WCJ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.