Technical questionAccepted answer
How to access AAD B2C tenant with Azure CLI
UserControl
May 7
0 views1
I need to get user details in AAD B2C tenant I have access to:
az ad user show --id 0cbb4fd6-7091-44fb-ab5e-d2bd9c366f59
This cannot find the user because I'm logged into my organization regular AAD tenant. B2C tenants do not have subscriptions, they're linked to the primary tenant which means I can't do
az login -t myb2ctenant.onmicrosoft.com
Working in the portal isn't handy, I'd like to do my routines in CLI. How can I do that?
1 answer
Accepted answer · original discussion
juunas
PermalinkMay 7
There is an option on the AZ CLI to access tenants without subscriptions. Change your command to:
az login -t myb2ctenant.onmicrosoft.com --allow-no-subscriptions
Explanation from az login -h:
Support access tenants without subscriptions. It's uncommon but useful to run tenant level commands, such as 'az ad'.
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.