March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
40 | |
26 | |
17 | |
11 | |
10 |
User | Count |
---|---|
57 | |
52 | |
23 | |
13 | |
11 |