I'm trying to switch tenants from the command line interface on my Windows 10 computer.
The answers provided here don't seem to work at all
I've also tried the following
az logout
az login --use-device-code (because of 2FA)
az login --username [my user name] -t [tenant id]
az login --tenant [tenant id]
az login --tenant [tenant name]
az account set --subscription [subscription id]
All these commands are completed successfully, however, when I run Get-AzSubscription
command, I still see the tenentID of a different tenant I use than the one I want to log into.
How can one successfully switch tenants from the command line interface using Microsoft Azure with 2FA while developing cloud native apps on a Windows 10 PC?