Auth0 CLI Warning When Deleting Applications
This article clarifies why the following warning message appears when using the Auth0 Command Line Interface (CLI) to delete applications. The issue occurs when attempting to delete either a single or multiple client IDs using the auth0 apps delete command, even after running auth0 apps use --none.
Warning: You're about to delete the client used to authenticate the CLI. If deleted, the CLI will cease to operate once the access token has expired.
The flow to reliably reproduce the warning is the following:
-
Run the command to log into Auth0 CLI:
auth0 login -
When asked "How would you like to authenticate?" select the option As a machine
-
Enter the tenant canonical domain
-
Select the preferred way to provide the client credentials
-
Enter the preferred client credentials (Must have access to the Management API)
-
Run the command to delete your applications:
auth0 apps delete [flags]
- Auth0 CLI
- Application Management
The warning triggers because one of the clients selected for deletion is the specific application used to authenticate the current CLI session.
The CLI tool identifies that removing this client will invalidate the session once the current access token expires. This warning persists even if no specific application is currently "in use" via the auth0 apps use --none command.
To resolve this issue and proceed with the deletion:
-
Identify the client ID used for the initial
auth0 loginsession. -
Verify if that specific client ID is included in the list of applications to be deleted.
-
If the application must be deleted, type
yoryeswhen prompted by the CLI to proceed. -
Authenticate the CLI again using
auth0 loginafter the current session expires or the client is removed.
NOTE: The applications will be deleted successfully if the process continues, but the CLI may require a new login once the access token is no longer valid.