Linux command
az-login 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Login
az login
Example
az login --service-principal -u [app-id] -p [password] --tenant [tenant-id]
Example
az login --identity
Example
az login --use-device-code
Example
az login --tenant [tenant-id]
说明
az login authenticates the Azure CLI with your Azure account. It supports multiple authentication methods including interactive browser login, service principals, managed identities, and device code flow. The command stores authentication tokens locally for subsequent Azure CLI commands.
参数
- --service-principal
- Login as service principal
- -u, --username _name_
- Username or app ID
- -p, --password _password_
- Password or certificate
- --tenant _id_
- Tenant ID or domain
- --identity
- Login using managed identity
- --use-device-code
- Use device code authentication
- --allow-no-subscriptions
- Allow login without subscriptions
- --scope _scope_
- OAuth scope for login
FAQ
What is the az-login command used for?
az login authenticates the Azure CLI with your Azure account. It supports multiple authentication methods including interactive browser login, service principals, managed identities, and device code flow. The command stores authentication tokens locally for subsequent Azure CLI commands.
How do I run a basic az-login example?
Run `az login` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --service-principal do in az-login?
Login as service principal