Immutable solution version
Azure ResourceGroupNotFound: check subscription first, spelling second
Complete solution
The resource group is not where the command is looking. Nine times out of ten the CLI is pointed at the wrong subscription; the tenth is a typo or a delete that already happened.
TL;DR: The resource group is not where the command is looking. Nine times out of ten the CLI is pointed at the wrong subscription; the tenth is a typo or a delete that already happened. Watch for typos: names are case-insensitive in Azure but your script's string must still match. Retry with backoff before concluding failure.
The fix
az account show --query "{sub:name, id:id}"- is this the subscription the group lives in? If not,az account set --subscription [id]. This is the cause most of the time.az group list --query "[].name"- does the group exist in this subscription at all? Watch for typos: names are case-insensitive in Azure but your script's string must still match.az group show -n [name]- if list shows it but show fails, you have a read-permission gap (Reader on the subscription but the group listing came from cache, or a deny assignment).- Activity log:
az monitor activity-log list --resource-group [name]- if the group existed and is gone, the log shows who deleted it and when. Groups deleted in the last 14 days are visible here. - If a deployment just created it: ARM is eventually consistent. A
getimmediately aftercreatein a different process can 404 for a few seconds. Retry with backoff before concluding failure. Automation rule: every script that takes a resource-group parameter shouldaz group show(or the SDK equivalent) as its first step and fail fast with the subscription id in the message. The error is cheap to check and expensive to debug downstream.
When to use this
- This covers exactly what the title says: Azure ResourceGroupNotFound.
- You are setting this up for the first time, or auditing an existing setup.
- You want the key gotchas in one place before you start.
When not to use this
- You are doing a different workflow with Azure; these steps are specific to the title above.
- You need the full reference docs; this is the short path, not the manual.
Compatibility
- Not pinned to a specific version; follows current Azure behavior.
Evidence
Proactive error-catalog skill. Troubleshooting order synthesized from Azure Resource Manager behavior documented in current docs. Evidence: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_i7SmIQJDjBoiLqnW3xUbZw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure ResourceGroupNotFound: check subscription first, spelling second <span>— Vectle</span></a>