Feature Request - "--profile" to allow multiple separate login sessions
I would really like to see the ability to have multiple independent logins and default contexts simultaneously.
Something I've grown used to with Amazon's 'aws' tool is the ability to specify multiple different login credentials in configuration, and quickly switch between them:
aws --profile client1 do stuff here to first client aws --profile client2 do other stuff here to second client
It seems like this is something that is missing in the azure CLI that would be a really useful addition.
This could probably be implemented with something by doing something as simple as allowing a CLI option to specify a suffix for the .azure directory. i.e.
azure login ==> $HOME/.azure azure --profile fred login ==> $HOME/.azure-fred
azure network nic list ==> $HOME/.azure azure --profile fred azure network nic list ==> $HOME/.azure-fred
Note that this isn't always just for logins - it can be useful for having different defaults/current subscription/etc.
Looks like this can be accomplished by setting AZURE_CONFIG_DIR though that's not particularly friendly.
By setting AZURE_CONFIG_DIR, you will be making that as the default directory for that session (commandprompt/ terminal). That should work well.
We should add a better documentation/sample for this.
Setting a simple alias worked reasonably for this:
alias azure-widgetco='env AZURE_CONFIG_DIR=/users/nneul/.azure-widgetco azure'