This tutorial will show how to install Microsoft Azure CLI on a Mac computer.
Step #1: Download the installer
and navigate to this page:
From the section “Use an installer” click on “OS X Installer”, download will start.
Once finished, click on the “Show downloads” button (normally located at the right of Safari’s toolbar). The list of recent downloads will show.
To open the installer just double click the related item in the list.
The installer window will appear.
The installer can now be run by double clicking on the package icon.
Once the Installer window appears, just click on “Continue”:
again on “Continue”:
You need to agree to the License terms:
Then proceed with the installation:
You’re required to enter your OS X credentials before starting the process:
Once the process is done you can close the installer:
Step #2: First Run
You can now run Azure CLI.
To open the Terminal click on the Spotlight icon:
and type (excluding quotes) “terminal”, then hit Enter.
The terminal window will appear:
Step #3: Authentication
You now need to authenticate the CLI using your Azure credentials.
Go back to the terminal and type:
CLI will ask you to open the page https://aka.ms/devicelogin and enter the code shown.
You can copy and paste the link into Safari and enter the code in the related page:
Then click on the “Continue” button that appeared at the bottom:
You’ll be redirected to a login page:
Redirection might occur twice:
Once authenticated a confirmation page will be shown:
and the command will complete:
You’re now all set to use Azure CLI.