ResourceGroupNotFound
ARM returns `ResourceGroupNotFound` when the target resource group does not exist in the active subscription context.
Last reviewed: February 9, 2026|Source-backed guidance under our editorial policy
Start Here
Use the closest compare guide, playbook, or adjacent error page to narrow the decision faster before you start changing production systems.
This page is part of the Error Reference library. Learn more about the project or report a correction.
What Does Resource Group Not Found Mean?
Deployment targeting fails at scope resolution, so no resources are created until the correct resource group and subscription context are used.
Common Causes
- -Resource group name is misspelled in deployment command, parameter file, or template.
- -Execution context points to a different subscription than the one containing the resource group.
- -Resource group was deleted or is being deleted while deployment is running.
- -Cross-scope automation reuses environment variables from another tenant/subscription pair.
How to Fix Resource Group Not Found
- 1Set explicit subscription context before deployment and verify it with account commands.
- 2Confirm target resource group exists and spelling matches exactly in deployment inputs.
- 3If the group was deleted, recreate it or update deployment target to an existing group.
- 4Retry only after scope and resource-group lifecycle state are confirmed stable.
Step-by-Step Diagnosis for Resource Group Not Found
- 1Capture deployment command inputs and the resolved subscription/resource group values.
- 2Run direct resource-group lookup in the same execution context as the failing deployment.
- 3Inspect Activity Log for recent delete/move operations that changed resource-group availability.
- 4Review pipeline variable sources to detect scope drift between environments.
Subscription and Scope Verification
- -Inspect active subscription before execution (example: agent defaults to shared subscription while deployment expects isolated production subscription).
- -Validate tenant-subscription-resource-group mapping in config (example: correct group name provided under wrong subscription GUID).
Resource Group Lifecycle Checks
- -Check for in-progress deletion state before retry (example: group exists in portal cache view but control plane still finalizing delete).
- -Audit recent IaC changes that renamed or replaced the target group (example: migration moved resources to new group but pipeline still targets legacy name).
Seen in Production
Pipeline deploys with stale resource group variable after environment rename
Frequency: common
Example: Command targets rg-prod-old while resources moved to rg-prod-main.
Fix: Update environment manifest and enforce preflight group-existence validation.
Engineer runs deployment in wrong subscription context locally
Frequency: rare
Example: Same template succeeds in CI but fails locally because CLI context points to sandbox subscription.
Fix: Set explicit subscription context and rerun after confirming target resource group presence.
Debugging Tools
- -az account show / az account set
- -az group show
- -ARM deployment operation logs
- -Azure Activity Log for delete/move operations
How to Verify the Fix
- -Re-run deployment and confirm
ResourceGroupNotFoundis resolved. - -Validate target resources are created in the intended resource group and subscription.
- -Ensure subsequent pipeline stages use the same verified scope context.
How to Prevent Recurrence
- -Store subscription ID and resource group name as immutable environment metadata.
- -Add preflight resource-group existence checks in deployment pipelines.
- -Block deployment when scope variables differ from approved environment manifest.
Pro Tip
- -resolve and log the final resource-group resource ID before each deployment step to catch late-bound scope drift early.
Official References
Provider Context
This guidance is specific to Azure services. Always validate implementation details against official provider documentation before deploying to production.