Auth0 Home Blog Docs

Multi-tenant application

Hello folks,

We have a web app connected to an Application in Auth0. I’m investigating if Auth0 supports our use cases for multi tenancy.

Here are our use cases -

  • Multiple tenants need to be set up to access a single web application
  • Each tenant has their own connection requirements. Example: One tenant can rely on username password for their users, but other tenant wants users to log in via enterprise.
  • Tenants do not have access to Auth0 Dashboard. They will manage their users (add/remove users) via our web application.

Per https://auth0.com/docs/design/using-auth0-with-multi-tenant-apps#auth0-and-multi-tenancy, it seems like the recommended way is to create multiple connections.

I was hoping to hear if these requirements could be met by Auth0. If anyone has a similar setup, I’d love to hear your experience of setting up connections per tenant and how has the approach scaled.

Thanks,
Hari

See this blog post for advice on multi-tenancy as well:

Hi @mathiasconradt,

We have a multi-tenancy system that looks like the first setup mentioned in the article. We got it working for a normal login/logout flow. However, we are having troubles making it usable for more than 1 simultaneous users. Here’s a brief example:

  • User A login to a.foo.com with his username/password at Tenant A
  • Without logging out, user A open a new tab and go to b.foo.com, which is the entrypoint of Tenant B

Current behavior:

  • No login screen showed and b.foo.com automatically assumes the identity of user A, which makes user A unable to login because his credentials at Tenant A are different from Tenant B

Expected behavior:

  • A login screen pops up at b.foo.com, allows User A to login to Tenant B while his session at Tenant A remains

Is it possible to achieve what I described above? Thanks.