Auth0 Home Blog Docs

Multi Tenant using Management API V2

management-api

#1

Hi,
I am creating a multi tenant SaaS that will use Auth0 as backbone, after i reviewed the Management API v2 i found some limitations so if you please could help me:

1- How can i create a new tenant “Account” using Management API as i see only Get and Update actions?
2- Can i generate Management API token with scope higher than tenant, i mean global subscription scope?
3- How can i create a custom DB connection with script using Management API?
4- Can i set a custom DB connection to be default for all tenants?
5- How can i create a non interactive api client to manage the tenant using Management API?

my real question would be how to manage the whole subscription using API at a level higher than the tenant “Account”.
Thanks


#2

Auth0 can handle multi-tenant customer scenarios, within a single Auth0 account. This would eliminate the need to create new accounts and connections. Metadata in the Auth0 User Profile can be used to store Roles, Permissions, and Groups, to cater to users with different permissions in different tenants, e.g:

{
  "email": "prashant@auth0.com",
  "app_metadata" : {
    "permissions" : {
      "auth0" : {
        "role" : "admin"
      },
      "sharelock" : {
        "role": "user"
      }
    }
  }
}  

The following doc provides more information on how Auth0 can be used in a multi-tenant scenario:
https://auth0.com/docs/tutorials/using-auth0-with-multi-tenant-apps


#3

Thanks, @prashant for your replay,
The architecture you send it considering that “Tenant = Client = App” while what i meant was “Tenant = Account = Multiple Apps” here the many difference is that we are going to provide SSO service to our customers that each one of them has multiple apps it is the same model that is provided here in Auth0 dashboard as your subscription is multi-account or multi-tenant.

So i am searching how to manage the subscription through API not only at account scope but higher than this as whole subscription scope.

I hope i can get some help on this.


#4

Hi,

Any suggestions?


#5

Thanks, @prashant for your replay,
The architecture you send it considering that “Tenant = Client = App” while what i meant was “Tenant = Account = Multiple Apps” here the many difference is that we are going to provide SSO service to our customers that each one of them has multiple apps it is the same model that is provided here in Auth0 dashboard as your subscription is multi-account or multi-tenant.

So i am searching how to manage the subscription through API not only at account scope but higher than this as whole subscription scope.

I hope i can get some help on this.


#6

Hi,

Any suggestions?


#7

We don’t currently have an API to manage your subscription as a whole. Our Management API does have the Update Tenant Settings endpoint which allows you to fine-tune settings on a tenant level.
https://auth0.com/docs/api/management/v2#!/Tenants/patch_settings


#8