# Auth0 pre-registration hook using SSO registration

**URL:** <https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695>\
**Category:** Get Help\
**Tags:** sso\
**Created:** [September 15, 2021, 9:17am UTC](https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695 "2021-09-15T09:17:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukasz.ziemnicki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lukasz.ziemnicki/32/31122_2.png) [@lukasz.ziemnicki](https://community.auth0.com/u/lukasz.ziemnicki)\
**Post date:** [September 15, 2021, 9:17am UTC](https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695/1 "2021-09-15T09:17:55Z")

</div>

Hi there,

We have implemented some pre-registration hook during our registration flow. That hook calls our API to check whether the account can be registered (on basis of email domain). Then deny or allow access.  
Why that hook does not work when I try to register using SSO but it works when email & password are passed manually? Is it desired behaviour or is it a bug?

I kindly ask for your help.  
Lucas

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 15, 2021, 11:55pm UTC](https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695/3 "2021-09-15T23:55:56Z")

</div>

Hi @lukasz.ziemnicki,

I understand that you have some questions regarding your Pre-Registration Hook when using SSO for registration.

As stated in our [Auth0 Hooks](https://auth0.com/docs/hooks) documentation, Hooks can only be used with [Database Connections](https://auth0.com/docs/connections/database) and [Passwordless Connections](https://auth0.com/docs/connections/passwordless).

Therefore, the Pre-Registration Hook will not work when signing up using SSO with Social or Enterprise Login.

Please let me know if you have any questions. I would be happy to clarify.

---

<div class="post-metadata">

**Author:** ![lukasz.ziemnicki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lukasz.ziemnicki/32/31122_2.png) [@lukasz.ziemnicki](https://community.auth0.com/u/lukasz.ziemnicki)\
**Post date:** [September 16, 2021, 9:05am UTC](https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695/4 "2021-09-16T09:05:04Z")

</div>

Thank you for the detailed answer. So any modified flow from here:

 ![Zrzut ekranu 2021-09-16 o 11.03.29](https://global.discourse-cdn.com/auth0/original/3X/8/7/87870aeac9dfa95d4fb62f2aaf54c48119b53ea1.png)  
won’t work for SSO?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 22, 2021, 6:50pm UTC](https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695/5 "2021-09-22T18:50:38Z")

</div>

Hi @lukasz.ziemnicki,

Behind the scenes, Hooks and [Actions](https://auth0.com/docs/actions) are functionally the same. They offer you a way to manipulate the authentication flow.

When using Actions, the following [Triggers](https://auth0.com/docs/actions/triggers) will not work with SSO:

- Pre-User Registration
- Post-User Registration
- Post-Change Password
- Send Phone Message

The only Trigger that will work with SSO is the Login Action. Note that the Machine-to-Machine Action is irrelevant to user authentication.

In general, using Hooks/Actions with connections varies according to the [extensibility points](https://auth0.com/docs/hooks/extensibility-points). Hooks and Actions only work with Database and Passwordless Connections.

Please let me know if there is anything else I can do to help. I would be glad to assist.

---

<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:** [December 6, 2021, 10:56pm UTC](https://community.auth0.com/t/auth0-pre-registration-hook-using-sso-registration/69695/6 "2021-12-06T22:56:20Z")

</div>

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