I am starting to use Auth0 CLI and it is generally working nicely, but I cannot choose a tenant when I login (auth0 login). It always defaults to the same tenant (which happens not to be our production tenant).
If I specify --domain on the auth0 login command, I end up with an “Activation Denied” error in the browser after confirming the code, etc.
Has anyone else run into this issue and how did you resolve it?
Are you using a private cloud or a public cloud? I am encountering the same issue in the private cloud, where we can only log in to one tenant at a time using the client credentials method (such as domain Client ID and secret). If it’s a public cloud, I can log in as a user and access multiple tenants without any issues.
When I use the “auth0 login” command (MacOS, terminal shell window) it logs in fine (as user) but always goes to our non-production tenant. There is no tenant choice dropdown available in the browser.
If I try to use “auth0 login --domain ” to login as user to a specific tenant, then that is when I end up with the “Activation Denied” page in the browser.
Thank you for posting your question. I couldn’t reproduce this issue on my end, but I found this GitHub issue that may be a good hint → unable to login to a different tenant · Issue #1003 · auth0/auth0-cli · GitHub. Can you try to reinstall your package or check if you are using the latest version? In terms of switching between default tenants, you can use the auth0 tenants use [tenant_name] command or simply auth0 tenants use and pick the tenant from the dropdown. Also you can try to clear your browser cache and try to re-login.
Sorry, but the “auth0 tenants use” command doesn’t work for me because the “auth0 tenants list” command only lists the one tenant that I’m logged in to.
Also, clearing the browser cache for auth0 did not help either.
Here is what I do:
In MacOS terminal session, type “auth0 login”
Choose “as a user”
Press enter to open browser to log in
In browser (Safari), I see a “Device Confirmation” window
I click “Confirm” on the device confirmation window
I see an “App Authorization” window - there is a long list of things the app will have access to, but there is no drop down to choose from available tenants
I click “Accept”
I see a “Congratulations” browser window
In the terminal session, it says “Successfully logged in” and shows “Tenant: release-…”
“auth0 tenants list” shows only the one tenant that I am logged into
There must be a dropdown on point number 6. I have attached a sample image from when I am logged in. You have access to both tenants in the same email, correct? Check my attached image.
Thank you, Dawid, for your investigation and response.
I don’t need to access tenant settings, though, I just want to be able to do the same things in the production tenant from the Auth0 CLI that I can already do in the Auth0 Dashboard - examine our users, create/delete users, reset MFA for our users, etc.
If that is not possible without Admin role/privilege in the production tenant, then I will see if I can get that.