1
votes

Context

I am trying to manage my Azure Devops projects and repositories in automated way using VSTS CLI. Maybe I am missing something, but it seems that the only way is access token. I would not use tokens, instead I prefer some more integrated auth method similar how Git Credential Manager integrates with Azure Devops. I prefer use "enterpise grade" (as MS calls it).

Question

What am I missing, how can I accomplish the simple task, like creating a repo on Azure Devops without messing wit PATs?

About auth methods MS writes:

Azure DevOps Services and TFS use enterprise-grade authentication to help protect and secure your data. Clients like Visual Studio and Eclipse (with the Team Explorer Everywhere plug-in) also support Microsoft account and Azure AD authentication. For non-Microsoft tools that integrate into Azure DevOps but don't support Microsoft account or Azure AD authentication, you must use PATs.

2
Git Credential Manager, of course, creates and uses PATs for you.Edward Thomson

2 Answers

1
votes

It seems that VSTS CLI has been deprecated and will no longer be receiving new features. As time of this writing the VSTS CLI documentation does not seem to mention this movement though.

Azure DevOps Extension for Azure CLI has replaced the VSTS CLI. Azure CLI supports the "enterprise grade" authentication, and Azure DevOps Extension commands are map to the depreciated VSTS CLI commands. Here is the mapping for the commands

1
votes

With the latest Azure DevOps CLI (https://docs.microsoft.com/en-us/azure/devops/cli/index?view=azure-devops), you can now access Azure DevOps by using az login where you can authenticate using o-auth flow. Check it out.

However, for non-interactive automation use case, PAT is the only method.