I'm trying to use az
against my Azure account. My account has two directories: one for personal (default) and one for business. I need to "switch to" the business directory so that az
has access to the correct resources. However, I cannot find any way to achieve this via the command line, so when I do az group list
I see the resource groups from my personal directory, not the business one.
How can I switch Azure directory from the CLI?
--allow-no-subscriptions
in case there is no subscription for the directory. So use like this:az login --tenant yourdir.onmicrosoft.com --allow-no-subscriptions
. E.g. we have directory for Azure AD B2C created and seems to require this, but not sure why. – Tornado