Import/Export Tenant Configuration to YAML File

The auth0-deploy-cli tool's YAML option supports the exporting to and importing of an Auth0 tenant configuration using a YAML file.

Import tenant configuration

To import an Auth0 tenant configuration:

  1. Copy config.json.example, making sure to replace the placeholder values with the values specific to your configuration.

    Use the client ID and secret from your newly-created client (the client is named auth0-deploy-cli-extension if you used the extension).

    By default, the tool merges with your current environment variables and overrides the config.json file (which has the same top key). You can use the --no-env option to disable the override via the command line.

    You can either set the environment variables, or you can place the values in a configuration file anywhere on the file system that is accessible by the CLI tool.

  2. Deploy using the following command:

Example: configuration file

Here is the example of a config.json file:

Import configuration example

Here is an example of an import config file tenant.yaml:

Export tenant configuration

To export your current tenant configuration, run a command that's similar to:

a0deploy export -c config.json --strip -f yaml -o path/to/export

The --strip option removes the identifier fields from the Auth0 objects. This is important because Auth0 generates new IDs when importing objects into Auth0 tenants. If you do not strip identifier fields from the objects you want to import, the import will fail due to the tool not being able to find existing objects using their original IDs.


Some of the settings cannot be exported, such as emailProvider credentials and rulesConfigs values. After exporting, you may need to update the values in tenant.yaml if you see schema-related errors during the import process.

For more information, see Environment Variables and Keyword Mappings.

Keep reading