Add optional default subscription if user needs to reconnect via Connect-AzAccount - #263
Merged
Michael Smith (Exolun) merged 4 commits intoAug 1, 2024
Conversation
Josh Wittner (jwittner)
requested changes
Aug 1, 2024
Josh Wittner (jwittner)
left a comment
Member
There was a problem hiding this comment.
Looks like a good feature, just some small changes requested.
+ Add validation of sub ID at entry point + Update check to just a string check in New-PAT instead of PSBoundParameters
Michael Smith (Exolun)
marked this pull request as ready for review
August 1, 2024 17:53
Josh Wittner (jwittner)
requested changes
Aug 1, 2024
Josh Wittner (jwittner)
approved these changes
Aug 1, 2024
Josh Wittner (jwittner)
left a comment
Member
There was a problem hiding this comment.
Left a note about splatting, but not a 'required' change, just something to improve here and to keep in mind (I think it'd be useful in the call to the function where I mention splatting as well).
Michael Smith (Exolun)
deleted the
user/mismit/default_subscription_onlogin
branch
August 1, 2024 22:00
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.
One of our users indicated that if the module requires a reauthentication to Azure, it was frustrating because it was erroring but not correctly providing the auth challenge, so he had to use
az loginmanually to reauthenticate and select his subscription ID.There are still problems with this insofar as even if we fix the cmdlet to correctly prompt the user with the login challenge, pipeline scripts won't support interactive resolution. So instead I thought we should add an optional default subscription ID so that when we reauthenticate it will not require a prompt asking the user to select one.
Doing a little testing tomorrow to validate this is the desired flow.