# ResourceGroupNotFound: Resource group 'x' could not be found

**Code:** `ResourceGroupNotFound` · **Category:** Azure · **Seen on:** Azure

The resource group doesn’t exist in the subscription the command or deployment is using.

## Meaning

The active subscription in Azure CLI/PowerShell is often not the one you expect. Typos, groups deleted or not yet created in a pipeline are other causes.

## Common causes

- Wrong active subscription
- Typo in the resource group name
- Group not created yet / deleted
- Service principal without access to that subscription

## Quick fix

1. az account show / az account set --subscription
2. az group list to find the name
3. Create the group before deploying

## Detailed fix by platform

### Azure CLI

1. 

```bash
az account show --query name
az account set --subscription "Production"
az group create -n rg-app -l westeurope
```


## How to diagnose

1. **Subscription** — Active one
2. **Name** — Exact group name
3. **Access** — Can the identity see it?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/azure/resourcegroupnotfound)
