ResourceGroupNotFound
ARM returns `ResourceGroupNotFound` when the target resource group does not exist in the active subscription context.
Last reviewed: February 12, 2026|Editorial standard: source-backed technical guidance
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).
How to Verify the Fix
- -Re-run deployment and confirm `ResourceGroupNotFound` is 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.
Decision Support
Compare Guide
403 Forbidden vs 404 Not Found: When to Hide Resources
Use 403 for explicit access denial, or 404 to conceal resource existence when security policy requires reducing endpoint and object enumeration risk.
Compare Guide
404 Not Found vs 410 Gone: Missing vs Permanent Removal
Learn when to return 404 (missing or temporary absence) versus 410 (intentional permanent removal), including redirect and cache implications.
Playbook
Resource State Playbook (404 / 410 / ResourceNotFound)
Use this playbook to separate temporary missing-resource lookups from permanent removals, then fix scope, lifecycle, and identifier drift safely.
Official References
Provider Context
This guidance is specific to Azure services. Always validate implementation details against official provider documentation before deploying to production.