Skip to content

Commit ad2f869

Browse files
authored
Merge pull request #100 from microsoft/automated-documentation-update-21929242626
Automated documentation update
2 parents d49c68e + f2a83c4 commit ad2f869

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/artifacts-helper/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ The `az` shim specifically intercepts `az account get-access-token` requests and
4343
to acquire tokens via the ado-codespaces-auth VS Code extension. This enables `DefaultAzureCredential`'s
4444
`AzureCliCredential` to work in Codespaces without requiring `az login`.
4545

46+
## Azure DevOps CLI Integration
47+
48+
For `az devops` commands, the shim automatically sets the `AZURE_DEVOPS_EXT_PAT` environment variable
49+
using the `ado-auth-helper` when falling through to the real Azure CLI. This enables `az devops`
50+
commands to authenticate without requiring manual `az devops login` or setting the token manually.
51+
52+
The shim will:
53+
1. Wait for `ado-auth-helper` to become available (up to 3 minutes, configurable via `MAX_WAIT`)
54+
2. Call `ado-auth-helper get-access-token` to retrieve an access token used by the Azure DevOps CLI extension
55+
3. Export `AZURE_DEVOPS_EXT_PAT` before executing the real `az` command
56+
57+
If `AZURE_DEVOPS_EXT_PAT` is already set, the shim will not overwrite it. If `ado-auth-helper` is not
58+
available after the timeout, the command will still execute (but may fail to authenticate to Azure DevOps).
59+
4660
For `npm`, `yarn`, `rush`, and `pnpm` this requires that your `~/.npmrc` file is configured to use the ${ARTIFACTS_ACCESSTOKEN}
4761
environment variable for the `authToken`. A helper script has been added that you can use to write your `~/.npmrc`
4862
file during your setup process, though there are many ways you could accomplish this. To use the script, run it like

0 commit comments

Comments
 (0)