An Azure service that is used to automate, configure, and install updates across hybrid environments.
Hi ,
Thanks for reaching out to Microsoft Q&A.
Nothing is “broken” in your setup. Azure Automation is simply not a good fit for large scale ARI runs due to module limitations and payload caps. The practical solution is to run this via a Hybrid Runbook Worker or VM, where you control modules and avoid these sandbox constraints.
imo, you are hitting 2 separate issues, both common when running Resource Inventory inside Azure Automation.
-
Start-ThreadJobnot recognized This is not a runtime version problem. Azure Automation sandboxes do not include theThreadJobmodule by default. ARI relies on it for parallel execution.
What is happening:
-
Start-ThreadJobcomes from the ThreadJob PowerShell module - Azure Automation runbooks (even PS 7.x) often run in a constrained environment without it
What to do:
- Import ThreadJob module explicitly into your Automation Account (from PSGallery)
- Or modify ARI scripts to fallback to
Start-Job(less efficient but works) - Or run this via Hybrid Worker (recommended for ARI scale scenarios)
-
ResponsePayloadTooLargefromSearch-AzGraphThis is a hard limit from Azure Resource Graph.
What is happening:
- Your query is returning >16 MB (limit is ~16 MB)
- ARI is trying to pull too much data in one shot
What to do:
- Limit scope aggressively:
- Use fewer subscriptions per run
- Filter resource types (e.g., exclude diagnostics, policies, etc.)
- Use fewer subscriptions per run
- Enable proper pagination:
- ARI already uses
-SkipToken, but payload is still too large per page
- ARI already uses
- Reduce columns in query (customize ARI queries if needed)
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.