Per-customer Azure CLI profiles. Gives each tenant identity its own AZURE_CONFIG_DIR folder that remembers its tenant, sign-in method and expected account. Switches the current shell between profiles or runs one command under a profile, signs straight back in to the right tenant when a token expires, warns about the wrong account, and never starts a sign-in from scrip
Per-customer Azure CLI profiles. Gives each tenant identity its own AZURE_CONFIG_DIR folder that remembers its tenant, sign-in method and expected account. Switches the current shell between profiles or runs one command under a profile, signs straight back in to the right tenant when a token expires, warns about the wrong account, and never starts a sign-in from scripts, CI or agents.
Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info
Install-PSResource -Name azswap -Version 0.0.1
You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More
Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More
0.0.1 - first public release. - azswap <profile> switches the shell's AZURE_CONFIG_DIR and signs in to the profile's tenant when the token has expired. - azswap new, login, list and help; tab completion for commands and profile names. - Each profile remembers its sign-in method (device code or -Interactive browser/WAM sign-in). - -Account records the account a profile must use; azswap warns on a mismatch and list marks it with '!'. - azswap run <profile> -- <command> runs one executable under a profile and refuses to run as the wrong account. - azswap import adopts existing ~/.azure-* folders, or splits ~/.azure into a profile per account (-FromDefault). - Never signs in from non-interactive hosts (redirected input, CI, -NonInteractive) or with -NoLogin; fails with the command to run instead. - Windows PowerShell 5.1 and PowerShell 7 on Windows, Linux and macOS.