Overview
It is possible to encounter difficulties when choosing between the Auth0 CLI and the Auth0 Deploy CLI for managing their Auth0 tenant. The challenge arises when it is unclear which tool should be used for specific tasks, such as real-time resource management versus configuration migration and deployment. This knowledge article aims to clarify the differences between these two tools.
Applies To
- Function: Real-time resource management, configuration migration, and deployment
- Process: Managing tenant configurations and deploying across environments
- Products: Auth0 CLI, Auth0 Deploy CLI
- Platforms: Auth0 Tenant, CI/CD pipelines
Cause
To replicate confusion or misuse of these tools:
- The Auth0 Deploy CLI may be used to create or manage real-time resources (e.g., clients or APIs), leading to errors such as missing configuration files or unsupported actions.
- Conversely, the Auth0 CLI may be used to migrate configurations across environments, only to realize that export/import functionality is unavailable.
Common error messages include:
- Invalid operation: The requested resource management function is unsupported by the Deploy CLI.
- Configuration export or import failed due to unsupported commands in the Auth0 CLI.
Solution
-
Auth0 CLI should be used to manage tenant resources in real-time. Common tasks include creating, updating, or deleting applications, APIs, users, and connections, retrieving logs or specific information about tenants, etc.
Example commands:
auth0 apps create
(to create an application)auth0 users list
(to list users in a tenant)
-
The Auth0 Deploy CLI should be used to migrate configurations between different environments, back up tenant settings, or automate deployments in CI/CD pipelines.
Example commands:
auth0-deploy-cli export
(to export tenant configuration)auth0-deploy-cli import
(to import configurations into a tenant)