{Profile} Hotfix: az login: fix KeyError: 'displayName'#12824
Merged
jiasli merged 2 commits intoAzure:releasefrom Apr 1, 2020
Merged
{Profile} Hotfix: az login: fix KeyError: 'displayName'#12824jiasli merged 2 commits intoAzure:releasefrom
jiasli merged 2 commits intoAzure:releasefrom
Conversation
Closed
qianwens
approved these changes
Apr 1, 2020
Collaborator
|
add to S168 |
jiasli
commented
Apr 1, 2020
jiasli
commented
Apr 1, 2020
Comment on lines
+927
to
+930
| if t.display_name: | ||
| logger.warning("%s '%s'", t.tenant_id, t.display_name) | ||
| else: | ||
| logger.warning("%s", t.tenant_id) |
Member
Author
There was a problem hiding this comment.
Use different formats depending on the presence of t.display_name.
arrownj
reviewed
Apr 1, 2020
fengzhou-msft
approved these changes
Apr 1, 2020
arrownj
approved these changes
Apr 1, 2020
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.
Description of PR (Mandatory)
Fix #12818: az login fails
The regression is introduced by #12726.
display_nameis only available since/tenants?api-version=2018-06-01, not available in/tenants?api-version=2016-06-01. We should retrievedisplay_namefromadditional_propertieswith a fallback.Actually this line shouldn't even be here due to the delay of REST spec fix and SDK release.
Testing Guide