The Auth0 CLI is a handy tool to help with designing and building your Auth0 experience. It lets you do a number of things including:
- Testing your universal login flow: Emulate your end users’ login experience by running
auth0 test login. - Troubleshooting in real-time: Inspect the events of your Auth0 integration as they happen with the
auth0 logs tailcommand. - Simplifying repetitive tasks: Create, update, list and delete your Auth0 resources directly from the terminal.
The Auth0 CLI has a simple interactive logging flow that lets you login as a user and it is powered by the device authorization flow. Unfortunately, this simple login experience isn’t supported if you’re in an Auth0 Private Cloud instead you’ll need to authenticate as a machine using a client credentials flow. The steps to connect to a private cloud tenant are as follows:
- Create a new M2M application in the tenant. Note: When creating the application be sure to follow the principal of least privilege and be careful with the scopes that you grant the application.

- From your application copy the Domain, Client ID and Client secret and copy them into the command below.
auth0 login --domain <tenant domain> --client-id < M2M application client ID> --client-secret < M2M Client Secret >
- Once the command is executed you should get a successfully logged in message like the below

- After, successfully logging in to the tenant you will need to use the
auth0 tenants use <tenant domain>command to begin using the cli with the private cloud tenant.

- You can now freely execute commands like
auth0 test loginas shown below.


IAMSE