Azure CLI
Auth Commands
Authenticate with Azure using interactive login, service principals, or managed identities. Configure subscriptions and manage account credentials.
8 commands
Pro Tips
Use 'az login --use-device-code' for headless environments like SSH sessions.
Service principals are preferred for CI/CD - use 'az ad sp create-for-rbac'.
Store credentials securely with 'az config set core.encrypt_credentials=true'.
Common Mistakes
Never commit service principal credentials to version control.
Use managed identities when running in Azure to avoid credential management.