Parse new azd auth error formats in AzureDeveloperCliCredential#46711
Open
JeffreyCA wants to merge 1 commit intoAzure:mainfrom
Open
Parse new azd auth error formats in AzureDeveloperCliCredential#46711JeffreyCA wants to merge 1 commit intoAzure:mainfrom
JeffreyCA wants to merge 1 commit intoAzure:mainfrom
Conversation
pvaneck
approved these changes
May 5, 2026
Member
pvaneck
left a comment
There was a problem hiding this comment.
LGTM overall. Looks like you just need to run black formatting locally (azpysdk black) for the Analyze check. Also, with "error" being preferred, is "suggestion" also something worth surfacing still?
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.
Fixes Azure/azure-dev#7859 (parent: Azure/azure-dev#7728)
Related:
Description
Starting with azd v1.23.7 (PR Azure/azure-dev#6827),
azd auth tokenchanged its stderr error format from the legacyconsoleMessageJSON to a structured{"error":"..."}JSON object. The stderr output may also include an extraneous emptyconsoleMessageline preceding the error (fixed in v1.24.0 via Azure/azure-dev#7701).This PR updates
AzureDeveloperCliCredentialerror parsing to handle all three formats:{"type":"consoleMessage","data":{"message":"..."}}{"type":"consoleMessage",...}\n{"error":"..."}(two lines){"error":"..."}(single line)Validation
In addition to unit tests, validated manually with small Python script:
Without changes (v1.23.6)
Without changes (v1.23.7+)
With changes (all versions)
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines