You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While returning SYSTEM_ACCESSTOKEN makes sense, I was surprised to see it returning the PAT variable if it's set, which was a little unexpected given the token subcommand. I did see a case for one of our customers where SYSTEM_ACCESSTOKEN was set to a PAT which also is unexpected.
Perhaps there could be a flag for the command to ignore environment variables?
The text was updated successfully, but these errors were encountered:
SYSTEM_ACCESSTOKEN is always set to a PAT in Azure Devops Pipelines. PAT's themselves are still authentication tokens, so that is by design.
The context of the ado token command is specifically around making it easy for developer tools to run locally on developer machines and in azure devops pipelines, hence the choice for those 2 env vars. When authenticating to ADO, you can use a PAT or a JWT - both are auth tokens, they happen to use different http Header formats.
There's logic in the
azureauth ado token
command that checks for environment variablesAZUREAUTH_ADO_PAT
andSYSTEM_ACCESSTOKEN
.microsoft-authentication-cli/src/AzureAuth/Commands/Ado/CommandToken.cs
Lines 92 to 99 in 5520cb0
While returning
SYSTEM_ACCESSTOKEN
makes sense, I was surprised to see it returning the PAT variable if it's set, which was a little unexpected given thetoken
subcommand. I did see a case for one of our customers whereSYSTEM_ACCESSTOKEN
was set to a PAT which also is unexpected.Perhaps there could be a flag for the command to ignore environment variables?
The text was updated successfully, but these errors were encountered: