# Sandbox Auth0 Database Connection

**URL:** <https://community.auth0.com/t/sandbox-auth0-database-connection/6350>\
**Category:** Get Help\
**Tags:** database-store, clients, database, connections\
**Created:** [April 25, 2017, 5:15am UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350 "2017-04-25T05:15:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.lagoda](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@brian.lagoda](https://community.auth0.com/u/brian.lagoda)\
**Post date:** [April 25, 2017, 5:15am UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350/1 "2017-04-25T05:15:38Z")

</div>

Hey everybody – new Auth0 user here.

We’re trying to move our entire universe over to Auth0, including our dev, staging, and production environments.

For cleanliness and safety, we want to sandbox these stages; someone who registers an account with one should not automatically have a login to another.

I feel like I almost have this working, but I’m missing something silly.

I’ll create a new client (dev-client), and then create a new Auth0 database connection (dev-db) for only this client\_id.

BUT when the new client is created, it _also_ has access to all of our other Auth0 database connections, and it (often? always?) prefers one of the old connections to the one I just made for it.

If I make another client (stage-client), and another database connection (stage-db), that client also has access to my dev-db.

So, I’m just really thoroughly confused. I’m not sure why this happens, or how to stop it, or even if this is the best way to go about sandboxing apps. Does anybody have any pointers for how I can keep my apps from sharing users? I’d love to just disable whatever’s causing my apps to start by assuming they should share connections, but if I have to do a totally different workflow, I’m open to suggestions.

Thanks.

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 25, 2017, 9:37am UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350/2 "2017-04-25T09:37:49Z")

</div>

Our recommended way to isolate your environments is to set up each on on a different account (e.g. myaccount-dev, myaccount-staging, myaccount). This is outlined here:

> **[Set Up Multiple Environments](https://auth0.com/docs/get-started/auth0-overview/create-tenants/set-up-multiple-environments)**
>
> Describes how to use multiple Auth0 tenants to manage various environments.

If you have multiple clients and connections in a single tenant, you will need to make sure you disable the connections that aren’t relevant for the client from the client settings.

Dashboard \> Clients \> My App Staging (example) \> Connections \> Disable dev/production connections.

**If you want to disable all connections by default** you can disable the `Enable Client Connections` setting in the Advanced Account settings:

Account Settings \> Advanced \> Enable Client Connections

---

<div class="post-metadata">

**Author:** ![brian.lagoda](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@brian.lagoda](https://community.auth0.com/u/brian.lagoda)\
**Post date:** [April 25, 2017, 9:18pm UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350/3 "2017-04-25T21:18:34Z")

</div>

Thanks @prashant – that’s obviously pretty disappointing to hear.

Is there any way to disable the extraneous connections from the API?

Where is the default behavior for which connections a new client inherits documented? (Or, if it’s easier, what is the default behavior for which connections a new client inherits?)

---

<div class="post-metadata">

**Author:** ![brian.lagoda](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@brian.lagoda](https://community.auth0.com/u/brian.lagoda)\
**Post date:** [April 25, 2017, 9:18pm UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350/4 "2017-04-25T21:18:34Z")

</div>

Thanks @prashant – that’s obviously pretty disappointing to hear.

Is there any way to disable the extraneous connections from the API?  
How do I use the API to get the list of connections for a client?

Where is the default behavior for which connections a new client inherits documented? (Or, if it’s easier, what is the default behavior for which connections a new client inherits?)

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 26, 2017, 12:28pm UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350/5 "2017-04-26T12:28:28Z")

</div>

@brian.lagoda please see my updated answer. We have the ability to disable all connections by default in the Advanced account settings. You can then explicitly enable the desired connection yourself, via the dashboard or the API by [Updating the Connection](https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id) with the client\_id:

```
"enabled_clients": "KB3iW41kZguOPGYYWRxxxxxxxxxxxxx"]

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/sandbox-auth0-database-connection/6350/6 "2018-03-02T05:53:28Z")

</div>


