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 am trying to get workspace , dataset,datasource type, connection string, report names for entire organization tenant. I am trying using below powershell script but i only get about 150+ rows... Can anyone help with this. How to get all these info for entire tenant. I am using admin account.
$allworkspace = Get-PowerBIWorkspace -All -Scope Organization
$allworkspace | Where-Object { ($_.Type -ne 'Personal') -or ( $_.Type -ne 'PersonalGroup') }| %{
$workspaceID = $_.Id
$workSpaceName = $_.Name
Write-Host "Checking Workspace :"$_.Name $_.Id -ForegroundColor Cyan
$reports = (Invoke-PowerBIRestMethod -Method GET -Url "groups/$($workspaceID)/reports/" | ConvertFrom-Json).value | Select-Object Name,ReportType,datasetId,datasetWorkspaceId ;
foreach ($r in $reports)
{
Write-Host "Check for report: $($r.name)" -ForegroundColor Yellow
if ($r.datasetId){
$dbdetails = (Invoke-PowerBIRestMethod -Method GET -Url "groups/$($r.datasetWorkspaceId)/datasets/$($r.datasetId)/Datasources" | ConvertFrom-Json).value
Write-Host "Checking Dataset for $($r.datasetId)" -ForegroundColor Yellow
$datasetsources= $dbdetails | Select-Object datasourceType,connectionDetails
if ($datasetsources.count -ge 2){
foreach( $datasrc in $datasetsources){
CheckConnectionString $workspaceID $workSpaceName $r.name $r.datasetId $r.datasetWorkspaceId $datasrc
}
}else{
if ($datasetsources) {
CheckConnectionString $workspaceID $workSpaceName $r.name $r.datasetId $r.datasetWorkspaceId $datasetsources
}else{
Write-Host "No datasource found for $($r.datasetId)"`n -ForegroundColor Red
}
}
}else{
if ($r.reportType -eq 'PaginatedReport'){
Write-Host "$($r.name) iS paginated report no datasource detail found"
}else{
}
Write-Host "$($r.name) doesn't have dataset" -ForegroundColor Red
}
}
Write-Host
}
Are you getting 429's ? You may be hitting the daily API call allowance.
You may want to look at the new scanner API that has recently been announced.
Scanner API is now in GA | Microsoft Power BI Blog | Microsoft Power BI
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 |
---|---|
57 | |
30 | |
24 | |
23 | |
20 |
User | Count |
---|---|
57 | |
37 | |
23 | |
22 | |
20 |