Please run 'az login' 🔷 Azure

Azure CLI: Please run 'az login' to setup account / No subscription found

The Azure CLI has no signed-in account (or its token expired), or the account has no subscriptions.

Seen on: Azure

Meaning

Fresh shells, containers, CI jobs and expired refresh tokens need az login (or a service principal/managed identity/OIDC login). “No subscriptions found” means the account has no access to any subscription in that tenant.

Common causes

  • Not logged in or token expired
  • CI job missing azure/login step
  • Logged in to a tenant without subscriptions
  • CLI config dir differs (sudo, containers)

⚡ Quick fix

  1. az login (or --use-device-code / --identity / service principal)
  2. Specify --tenant if you have several
  3. Check role assignments if no subscriptions appear

Detailed fix by platform

Azure CLI

  1. bash
    az login --tenant contoso.onmicrosoft.com
    az login --identity   # managed identity on Azure VM/runner
    az account list -o table

How to diagnose

  1. Account — az account show
  2. Tenant — Correct tenant?
  3. CI — Login step present?

🔧 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.