az login --help Log in to Azure.
-
$ az login --help Command az login : Log in to Azure. Arguments --allow-no-subscriptions : Support access tenants without subscriptions. It's uncommon but useful to run tenant level commands, such as 'az ad'. --password -p : Credentials like user password, or for a service principal, provide client secret or a pem file with key and public certificate. Will prompt if not given. --service-principal : The credential representing a service principal. --tenant -t : The AAD tenant, must provide when using service principals. --use-cert-sn-issuer : Used with a service principal configured with Subject Name and Issuer Authentication in order to support automatic certificate rolls. --use-device-code : Use CLI's old authentication flow based on device code. CLI will also use this if it can't launch a browser in your behalf, e.g. in remote SSH or Cloud Shell. --username -u : User name, service principal, or managed service identity ID. Managed Service Identity Arguments --identity -i : Log in using the Virtual Machine's identity. Global Arguments --debug : Increase logging verbosity to show all debug logs. --help -h : Show this help message and exit. --output -o : Output format. Allowed values: json, jsonc, none, table, tsv, yaml. Default: json. --query : JMESPath query string. See http://jmespath.org/ for more information and examples. --verbose : Increase logging verbosity. Use --debug for full debug logs. Examples Log in interactively. az login Log in with user name and password. This doesn't work with Microsoft accounts or accounts that have two-factor authentication enabled. az login -u [email protected] -p VerySecret Log in with a service principal using client secret. az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com Log in with a service principal using client certificate. az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem --tenant contoso.onmicrosoft.com Log in using a VM's system assigned identity az login --identity Log in using a VM's user assigned identity. Client or object ids of the service identity also work az login --identity -u /subscriptions/<subscriptionId>/resourcegroups/myRG/providers/Microso ft.ManagedIdentity/userAssignedIdentities/myID For more specific examples, use: az find "az login"
© Lightnetics 2024