SubscriptionNotFound 🔷 Azure

SubscriptionNotFound: The subscription 'x' could not be found

The subscription ID doesn’t exist in the current tenant or the identity has no access to it.

Seen on: Azure

Meaning

Logging in to the wrong tenant, using a subscription ID from another environment, or a service principal without any role on the subscription.

Common causes

  • Wrong tenant in az login
  • Subscription ID typo or from another directory
  • No role assignment for the identity
  • Subscription disabled/cancelled

⚡ Quick fix

  1. az account list --all to see accessible subscriptions
  2. az login --tenant <id>
  3. Assign a role on the subscription to the principal

Detailed fix by platform

Azure CLI

  1. bash
    az account list --all -o table
    az login --tenant <tenant-id>
    az account set --subscription <id>

How to diagnose

  1. Tenant — Current tenant
  2. Access — Role assignments
  3. State — Enabled?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.