Repository navigation
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested a review
from Yong Zhang (yonzhan)
October 6, 2026 05:58
microsoft-github-policy-service
Bot
requested a review
from ZelinWang (wangzelin007)
October 6, 2026 05:58
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The narrow fallback addresses the reported failure; the remaining test-coverage suggestion is non-blocking.
Review effort: Balanced
Findings: 1
What changed in this PR
Fixes #32284 by allowing az storage blob sync to recognize URL-based SAS authentication without requiring Azure CLI login.
Changes:
- Checks the client URL for SAS indicators when credentials are absent.
- Preserves existing account-key handling and OAuth fallback.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/storage/azcopy/util.py | Recognizes SAS authentication in the client URL query. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+167
to
+170
| elif getattr(client, "url", None): | ||
| query = urlparse(client.url).query | ||
| if any(indicator in query for indicator in sas_indicators): | ||
| is_oauth = False |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
az storage blob sync using --sas-tokenaz storage blob sync using --sas-token
This branch has not been deployed
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.

Related command
az storage blob syncDescription
Fix #32284
az storage blob sync: Fix using azcopy with --sas-token without logging into azcliWhen
--sas-tokenis used, the storage SDK leavesclient.credentialasNoneand appends the SAS directly to the client URL's query string instead of keeping it as a string credential.client_auth_for_azcopyonly checkedclient.credential, so it always fell back to AAD auth and failed withPlease run 'az login' to setup account.(regression related to #32048, which only fixed the--account-keycase).Fix: when
credentialis empty, also check the client URL's query string for SAS indicators (sig=,sv=,sr=,se=,sp=) before falling back to oauth.Testing Guide
az storage blob sync -c --account-name --sas-token "" -s --destination
Should sync without prompting for
az login.History Notes
[Storage] Fix #32284:
az storage blob sync: Fix using azcopy with--sas-tokenwithout login into azcliThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.