Generating PATs from the command line

Personal Access Tokens (PATs) are alternate passwords that you can use to authenticate into Azure DevOps. See Microsoft Docs if you want to know more.

PATs serve a very useful purpose as anyone who has used Azure DevOps can attest to. The usual manner of creating a PAT is to use the web UI to access your personal profile and create the token by filling in a form.

Today on an internal mail list I learnt something new about working with PATs…

##You can create PATs using a commandline tool!

While this won’t be super useful for the majority of users, there are a few use cases where this is a requirement, namely when creating a PAT for service accounts that don’t have interactive login rights.

If you’re interested in leanring more or you want to download and use this utility, you can find the utility (and all code) at the VstsPatGenerator Azure DevOps site.

As an aside, a quick look through the commit history sees that good mate and fellow Aussie, Mitch Denny, had a hand in creating this utility. Cheers Mitch!