# Set a default/fallback enterprise connection for all unrecognized emails

**URL:** <https://community.auth0.com/t/set-a-default-fallback-enterprise-connection-for-all-unrecognized-emails/19063>\
**Category:** Get Help\
**Tags:** enterprise, lock\
**Created:** [December 13, 2018, 9:08pm UTC](https://community.auth0.com/t/set-a-default-fallback-enterprise-connection-for-all-unrecognized-emails/19063 "2018-12-13T21:08:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![omar.dfin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/omar.dfin/32/12738_2.png) [@omar.dfin](https://community.auth0.com/u/omar.dfin)\
**Post date:** [December 13, 2018, 9:08pm UTC](https://community.auth0.com/t/set-a-default-fallback-enterprise-connection-for-all-unrecognized-emails/19063/1 "2018-12-13T21:08:12Z")

</div>

Specifically, I’m trying to create an enterprise connection that will be used if no other connection is found to support a specific domain.

For example, we have 2 enterprise connections:

- ad-1: supports the domains `@domainA.com` and `@domainB.com`.

- ad-2: supports all other domains.

How can I get this setup using the Lock widget? I tried to set the “defaultEnterpriseConnection” property to `ad-2` but when I try to enter an email address that isn’t supported by `ad-2`, I get an error that says “Please use your corporate email to login.”.

I know I could add all the individual domains to `ad-2`, but it would be great if I can get away from having to add to that every time we add new users to that AD.

---

<div class="post-metadata">

**Author:** ![thameera](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thameera/32/13430_2.png) [@thameera](https://community.auth0.com/u/thameera)\
**Post date:** [December 14, 2018, 5:25am UTC](https://community.auth0.com/t/set-a-default-fallback-enterprise-connection-for-all-unrecognized-emails/19063/3 "2018-12-14T05:25:33Z")

</div>

Hey @omar.dfin, there’s no built-in way in the connections to do this, but you can play around Lock’s `connectionResolver` hook and see if you can implement the logic there: [GitHub - auth0/lock: Auth0's signin solution](https://github.com/auth0/lock#other-options)

---

<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:** [January 13, 2019, 5:25am UTC](https://community.auth0.com/t/set-a-default-fallback-enterprise-connection-for-all-unrecognized-emails/19063/4 "2019-01-13T05:25:36Z")

</div>

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