Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
33 | |
32 | |
27 | |
24 |
User | Count |
---|---|
40 | |
33 | |
19 | |
18 | |
16 |