# SSO User Provisioning

**URL:** <https://community.auth0.com/t/sso-user-provisioning/70961>\
**Category:** Get Help\
**Tags:** enterprise-connectio, login\
**Created:** [October 7, 2021, 8:01pm UTC](https://community.auth0.com/t/sso-user-provisioning/70961 "2021-10-07T20:01:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.boldt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.boldt/32/12921_2.png) [@john.boldt](https://community.auth0.com/u/john.boldt)\
**Post date:** [October 7, 2021, 8:01pm UTC](https://community.auth0.com/t/sso-user-provisioning/70961/1 "2021-10-07T20:01:31Z")

</div>

Is there an easy way to determine if an email domain is associated with an enterprise SSO connection?

We are currently using a database connection. When we add a new user to our application, we immediately provision that user in Auth0.

We are now giving customers the option to use enterprise SSO. In that case, we don’t want to provision the user when the user is added to our application - we’re using a post login script to provision the user after their initial login.

My thought is to use the management api connections endpoint to retrieve all SSO domains at application startup, then ignore provisioning if the user email’s domain is within the domain collection. Is this the best way to accomplish this?

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [October 8, 2021, 1:03pm UTC](https://community.auth0.com/t/sso-user-provisioning/70961/3 "2021-10-08T13:03:37Z")

</div>

Hi @john.boldt

If you are using home realm discovery, you can do this with the management API:

> **[Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id)**

See the “realms” field in the returned data.

If you are not doing home realm discovery, there is no way to guess if an email belongs to an enterprise connection or is a DB user.

John

---

<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:** [October 8, 2021, 1:24pm UTC](https://community.auth0.com/t/sso-user-provisioning/70961/4 "2021-10-08T13:24:12Z")

</div>

Thanks for helping on this one John!

---

<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:** [October 23, 2021, 1:24pm UTC](https://community.auth0.com/t/sso-user-provisioning/70961/5 "2021-10-23T13:24:41Z")

</div>

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