# Multi tenant solution

**URL:** <https://community.auth0.com/t/multi-tenant-solution/21359>\
**Category:** Get Help\
**Tags:** multi-tenant\
**Created:** [February 15, 2019, 11:34am UTC](https://community.auth0.com/t/multi-tenant-solution/21359 "2019-02-15T11:34:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![miki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/miki/32/11099_2.png) [@miki](https://community.auth0.com/u/miki)\
**Post date:** [February 15, 2019, 11:34am UTC](https://community.auth0.com/t/multi-tenant-solution/21359/1 "2019-02-15T11:34:34Z")

</div>

Hi,  
We are starting to build our SaaS solution and require authentication as a service solution.  
We have a few types of customers where some a small/medium type and require regular authentication. meaning username/password + client\_id and secret type of authentication.

On the other hand, we are going to have enterprise customers who already have their own authentication method and would like to implement SSO - each customer with his own SSO provider.

Looking at the documentation it is unclear on how I can achieve that using Auth 0.  
Can you please help and specify how is it possible to create multiple tenants in Auth 0?

Thanks,  
Miki.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 15, 2019, 12:24pm UTC](https://community.auth0.com/t/multi-tenant-solution/21359/2 "2019-02-15T12:24:19Z")

</div>

Hey @miki!

Have you checked our docs on multi tenant apps?

Here they are:

> **[Multi-Tenant Applications Best Practices](https://auth0.com/docs/get-started/auth0-overview/create-tenants/multi-tenant-apps-best-practices)**
>
> Describes best practices for how to use Auth0 to secure your multi-tenant applications.

> **[How To Use Auth0 To Manage Your Multi-Tenant Application](https://auth0.com/blog/how-to-use-auth0-to-manage-your-multi-tenancy-application/)**
>
> Using multi-tenancy you can cut costs and still allow your customers strict control over their data

Let me know if that’s helpful!

---

<div class="post-metadata">

**Author:** ![miki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/miki/32/11099_2.png) [@miki](https://community.auth0.com/u/miki)\
**Post date:** [February 15, 2019, 4:37pm UTC](https://community.auth0.com/t/multi-tenant-solution/21359/3 "2019-02-15T16:37:21Z")

</div>

Hi @konrad.sopala,  
Yes, I read the docs. They specify that I should maintain my tenants via `app_metadata` for example.  
This is ok as long as I don’t use SSO but a single DB connection for all my tenants.

What I’m trying to figure out is how to do that but still, allow different SSO methods/providers per tenant.  
Since app\_metadata is available after the login, I need a way to assign a user/application to a tenant before the login procedure so I can redirect the user to tenant SSO provider.

Is that possible or do you have a different way to achieve that?

Also, in the API docs there is a tenant entity, but in the UI the is no way to create one.

Thanks,  
Miki.
