-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Today, adding 'Add-AzAccount' outputs a requirement for the end user to open a browser and manually navigate to a URL (based on the Azure environment) and manually entering a code. This is a bit tedious in terms of repetition and copy/paste. This method is different from the previous mechanism (Add-AzureRMAccount) which popped up a built-in web prompt.
Some thoughts on feature ideas:
The request is to add optional flags to 'Add-AzAccount' which can stipulate:
1a. Auto opening the URL (meaning it would open the local workstation's default browser)
Add-AzAccount -Envrionment 'AzureUSGovernment' -OpenURL
1b. Appending the code to the URL string that gets opened as part of request #1a
Add-AzAccount -Envrionment 'AzureUSGovernment' -AppendCode
1c. Add flag to include code in workstation's clipboard
Add-AzAccount -Envrionment 'AzureUSGovernment' -CopyCode
Default output request:
2a. Change the default output of the cmdlet to include the code as a pre-filled in string within URL (once the URL endpoint supports the flag):
It would look like this:
Add-AzAccount -Environment 'AzureUSGovernment'
WARNING: To sign in, use a web browser to open the page https://microsoft.com/deviceloginus?Code=BD3P5GNJW to authenticate.