How to sync or copy roles and application permissions across tenants?

We’re developing a product using Auth0 and I’m under the impression the best practice is to create a dev tenant to do local development work and a separate prod tenant. And maybe a staging tenant. With that separation in mind, what is the Auth0 way of syncing/copying tenant data like roles, applications, application permissions, etc. to a staging or prod tenant?

  • Is to manually recreate the roles and permissions on a staging/prod tenant? This flow at face value seem tedious and error prone especially when a product has a ton of roles and permissions.
  • Is it to write an external script to copy over relevant data from tenant to tenant?

Hi @dnlsandiego and welcome to the Auth0 Community!

You are correct, separating your tenants into prod, dev, and staging is a common pattern our customers use. We have this documentation surrounding setting up multiple environments which I believe should help clear up how to sync your tenants. That document basically recommends leveraging our Management API to help migrate settings from one tenant to another, this community post is a decent example of this.

We also offer the Deploy CLI which is a way to programmatically create tenants and migrate tenant settings. This is a very powerful tool but when used correctly it can remove a lot of the tedium you’re hoping to avoid.

Hope these materials help, let me know if you have any further questions.


1 Like

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