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
- az login (or --use-device-code / --identity / service principal)
- Specify --tenant if you have several
- Check role assignments if no subscriptions appear
Detailed fix by platform
Azure CLI
- bash
az login --tenant contoso.onmicrosoft.com az login --identity # managed identity on Azure VM/runner az account list -o table
How to diagnose
- Account — az account show
- Tenant — Correct tenant?
- 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:
Similar errors
Most viewed in Azure
- AuthorizationPermissionMismatch Azure Storage: AuthorizationPermissionMismatch (403) — This request is not authorized to perform this operation using this permission
- App Service Application Error Azure App Service: ":( Application Error" / container didn’t respond to HTTP pings
- AuthorizationFailed Azure: AuthorizationFailed — The client does not have authorization to perform action
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026