DEV Community

Cover image for Azure-cli: Linking the azure account and installing the azuredevops extension
romerito
romerito

Posted on

Azure-cli: Linking the azure account and installing the azuredevops extension

To understand better, look at the previous post:link

Well, now that we have the azure-cli installed on linux, let's link it with our microsoft azure account, the process is quite simple, in terminal, type the following command:

romerito@dev:~$ az login
Enter fullscreen mode Exit fullscreen mode

Pressing [Enter] will bring up a web page similar to this one.

Image description

In my case, I already have the account logged in, so I just need to select it. One important detail, the account you add must be the same account that accesses the Azure Portal. After you select the account, a success message will appear, close it and go back to the terminal and you will see something like this.

Image description

There you go, from that point on you can manage azure resources via the command line.
And finally, let's install the azure devops extension using this command:

romerito@dev:~$ az extension add --name azure-devops
Enter fullscreen mode Exit fullscreen mode

Wait a few seconds and pahhhh, installed!
To check if it really isntalled, type in terminal:

romerito@dev:~$ az devops -h

Group
    az devops : Manage Azure DevOps organization level operations.
        Related Groups
        az pipelines: Manage Azure Pipelines
        az boards: Manage Azure Boards
        az repos: Manage Azure Repos
        az artifacts: Manage Azure Artifacts.

Subgroups:
    admin            : Manage administration operations.
    extension        : Manage extensions.
    project          : Manage team projects.
    security         : Manage security related operations.
    service-endpoint : Manage service endpoints/connections.
    team             : Manage teams.
    user             : Manage users.
    wiki             : Manage wikis.

Commands:
    configure        : Configure the Azure DevOps CLI or view your configuration.
    invoke           : This command will invoke request for any DevOps area and resource. Please use
                       only json output as the response of this command is not fixed. Helpful docs -
                       https://docs.microsoft.com/en-us/rest/api/azure/devops/.
    login            : Set the credential (PAT) to use for a particular organization.
    logout           : Clear the credential for all or a particular organization.

Enter fullscreen mode Exit fullscreen mode

That's it for today, in the next post we will create a project in azure devops.

Top comments (0)