Auth0 Deploy CLI with Multiple Tenants


We are trying to use the Auth0 Deploy CLI to make it easier for us to keep things like Actions and Flows version-controlled and easily push changes between environments. When we export from Auth0 using a0deploy, the yaml includes information like Organizations and Clients/applications.

However, the Organizations and Clients vary from tenant to tenant. How do we avoid deploying Organizations and Clients (and other things that vary from tenant to tenant) to different tenants while still deploying things like Actions and Flows (which are the same from tenant to tenant)?

Thank you.

Hi @rogupta,

Thanks for reaching out to the Auth0 Community!

To the best of my knowledge, the Auth0 Deploy CLI will only throw an error if the importing tenant.yaml file attempts to import an Organization/Client with an already used name. For example, you will not be able to import the “Default App” since that application is automatically generated when you create a new tenant.

In this case, I recommend going to your tenant.yaml file and remove the “Default App” client object or make changes so that there is no conflict.

This applies to all properties across your Tenant including Rules and Actions.

I hope this answers your question.

Please feel free to reach out if you have any additional questions. I’d be happy to help.

Thank you.

Thanks for the response, Rueben.

The types of errors you mentioned are not my concern. I am more worried about the organizations and clients from our dev Auth0 tenant being pushed to our stage and prod Auth0 tenants. In other words, we don’t want the organizations from our dev Auth0 tenant to be present in our other tenants. How can we prevent that from happening? Do we need to manually delete those entities from the yaml generated from the dev tenant before deploying to our other tenants?

Hi @rogupta,

Thank you for your reply.

Yes, that is correct! You will need to omit the Organizations object from your tenant.yaml file when importing to your new tenants to avoid importing them. Just to iterate, this strategy applies to any object across your tenant.

Hoped this helps!


Hi Rueben,

I found another way here: auth0-deploy-cli/ at master · auth0/auth0-deploy-cli · GitHub

Thanks for your help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.