ResourceNotFound
Azure Resource Manager returns `ResourceNotFound` when it cannot locate the requested resource in the active subscription and resource group context.
Last reviewed: February 12, 2026|Editorial standard: source-backed technical guidance
What Does Resource Not Found Mean?
ARM cannot resolve the resource identifier, so dependent operations fail until the exact resource name, group, and subscription mapping are corrected.
Common Causes
- -Operation runs under a different subscription than the resource actually resides in.
- -Resource name or resource group value is misspelled or case-mismatched in deployment input.
- -Template references a resource that was deleted, renamed, or replaced.
- -Cross-scope reference uses incomplete resource ID segments.
How to Fix Resource Not Found
- 1Verify active subscription context (`az account show`) matches the resource owner subscription.
- 2Confirm exact resource name and resource group from Azure portal or CLI.
- 3Update template/reference functions with complete, correct resource IDs.
- 4Retry only after identifiers are corrected and dependency resources are confirmed present.
Step-by-Step Diagnosis for Resource Not Found
- 1Capture failed resource ID, deployment operation details, and subscription context.
- 2Run resource lookup commands in the same subscription and resource group as the deployment.
- 3Inspect deployment history to find stale references or ordering/dependency issues.
- 4Validate parent resources exist before creating or updating child resources.
Name, Resource Group, and Subscription Validation
- -Cross-check resource triplet (`name`, `resourceGroup`, `subscriptionId`) against portal inventory (example: deployment uses correct name but wrong subscription context).
- -Validate full ARM resource ID formatting in templates (example: missing provider/type segment in `resourceId()` output).
Deployment Dependency and State Drift Checks
- -Verify dependency creation order in template or pipeline (example: child resource deploys before parent resource exists).
- -Inspect recent delete/move/rename operations (example: reference still points to an old resource group after migration).
How to Verify the Fix
- -Re-run the failing ARM operation and verify `ResourceNotFound` is resolved.
- -Confirm lookup commands return the resource under expected subscription and group.
- -Validate downstream deployments no longer use stale resource identifiers.
How to Prevent Recurrence
- -Generate resource IDs from centralized outputs rather than hard-coded strings.
- -Enforce subscription and resource-group context checks at deployment start.
- -Add validation tests for reference functions and dependency ordering in templates.
Pro Tip
- -persist a signed environment manifest with resource IDs and fail deployments when runtime IDs drift from the manifest baseline.
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.