Forum Discussion
Unknown ResourceLimitsPackageCountExceeded error
Hi gotters​,
On your follow-up about monitoring the real count: I don't know the exact internal formula the service uses for that limit, but since your symptoms line up with import records, the practical approach is to track reports + models + imports per workspace yourself and alert well before 1,000. The imports API is the part the UI never shows you. A scheduled PowerShell job can do it:
# Requires: Install-Module MicrosoftPowerBIMgmt
Connect-PowerBIServiceAccount
$threshold = 900
$ws = Get-PowerBIWorkspace -All
$report = foreach ($w in $ws) {
$base = "groups/$($w.Id)"
$reports = (Invoke-PowerBIRestMethod -Url "$base/reports" -Method Get | ConvertFrom-Json).value
$models = (Invoke-PowerBIRestMethod -Url "$base/datasets" -Method Get | ConvertFrom-Json).value
$imports = (Invoke-PowerBIRestMethod -Url "$base/imports" -Method Get | ConvertFrom-Json).value
[pscustomobject]@{
Workspace = $w.Name
Reports = $reports.Count
Models = $models.Count
Imports = $imports.Count
Total = $reports.Count + $models.Count + $imports.Count
}
}
$report | Sort-Object Total -Descending | Format-Table
$report | Where-Object Total -ge $threshold # alert on theseRun it with an account that is a member of the workspaces (or adapt it to the admin endpoints, e.g. groups via the Admin API, if you want tenant-wide coverage without workspace membership), and send the result to a table or Teams alert on a schedule.
To stop the number growing, change how reports land in that workspace: since service-created reports did not hit the error, deploy new versions with Update Report Content / rebind (or Fabric item definition APIs / Git) instead of re-importing a .pbix each time, so you update an existing report rather than creating a new import record.
So my overall approach would be:
Scheduled script: reports + models + imports per workspace
-> Alert at ~900
-> Stop re-importing .pbix: update existing reports in place
-> Support ticket for cleanup of the existing orphaned importsAI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.