Use Azure CLI for early-access feed token - #27849
Merged
Justin Chung (jshigetomi) merged 1 commit intoAug 13, 2026
Merged
Conversation
Avoid the AzurePowerShell task's dependency on a preinstalled Az.Accounts module when configuring early-access NuGet credentials on Linux agents. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8784f802-9d66-4692-b64d-c0713fa213cb
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure Pipelines template responsible for setting up Azure Artifacts authentication in early-access scenarios by switching from the Azure PowerShell task to the Azure CLI task for token acquisition, removing the dependency on a preinstalled Az.Accounts module (notably impacting Linux agents).
Changes:
- Replaces
AzurePowerShell@5withAzureCLI@2to acquire an Azure DevOps access token viaaz account get-access-token. - Adds an explicit failure path when the Azure CLI token request fails or returns an empty token.
- Keeps the existing secret/variable wiring for
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS, but now backed by an Azure CLI–acquired token.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Patrick Meinecke (SeeminglyScience)
approved these changes
Aug 13, 2026
Justin Chung (jshigetomi)
merged commit Aug 13, 2026
174a753
into
PowerShell:master
38 of 39 checks passed
This was referenced Aug 13, 2026
9 tasks
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AzurePowerShell@5withAzureCLI@2when acquiring the early-access Azure DevOps feed tokenAz.AccountsmoduleContext
The Linux SDK validation in build 707180 failed before running the inline script because the
PowerShell1ES 3image did not have a discoverableAz.Accountsmodule. The equivalent Windows and macOS jobs succeeded because those images hadAz.Accountsinstalled.Failing log: https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=707180&view=logs&j=32463283-3482-5fcf-b4f1-bff946268a97&t=8121e543-1209-5880-8988-618789d8de73