Getting started with Azure CLI
Last updated
Last updated
This chapter is to login to the Azure CLI from your student machine as you may not want to use the Azure Cloud shell all the time.
First check if you are already logged in
If you aren't logged in, you should get this output.
Now that we know we don't have Azure account setup, we can use the following command to begin. The --use-device-code
parameter is used to generate a code that can be used to authenticate with the web backend
We will get something like this
Note the code XXXXXXX mentioned.
Browse to the URL and enter the code when asked.
Confirm by clicking on Continue
Select your account
Web page will confirmed you are logged in
Switch back to the window where you typed the az login
command
Note the id
from the previous output.
Only if you were already logged in, get the default Azure account if you have more than one.
Set this new account as default