# User Registration during SS0 Login

**URL:** <https://community.auth0.com/t/user-registration-during-ss0-login/134113>\
**Category:** Get Help\
**Tags:** oidc-enterprise-connection, connections\
**Created:** [May 14, 2024, 3:28pm UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113 "2024-05-14T15:28:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe.abraham](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe.abraham/32/49540_2.png) [@joe.abraham](https://community.auth0.com/u/joe.abraham)\
**Post date:** [May 14, 2024, 3:28pm UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113/1 "2024-05-14T15:28:38Z")

</div>

I’m trying to login with a user which is not present in Auth0 via SSO. This creates a new user in Auth0. How to prevent this user registration and need to throw error if the user does not exists in Auth0

---

<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:** [May 15, 2024, 4:24pm UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113/3 "2024-05-15T16:24:57Z")

</div>

Hi @joe.abraham,

You could either do this in a [Pre-User Registration Action script](https://auth0.com/docs/customize/actions/flows-and-triggers/pre-user-registration-flow/api-object) to prevent unregistered users from signing up.

Alternatively, you can disable the sign up option completely in your Database connection.

You can disable sign ups by going to [Auth0 Dashboard \> Authentication \> Database \> YOUR\_CONNECTION](https://manage.auth0.com/#/connections/database), scroll to the bottom, and toggle on the **Disable Sign Ups** button.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![joe.abraham](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe.abraham/32/49540_2.png) [@joe.abraham](https://community.auth0.com/u/joe.abraham)\
**Post date:** [May 16, 2024, 6:08am UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113/4 "2024-05-16T06:08:55Z")

</div>

Hi @rueben.tiow,

I’ve already toggled on the disable signups in Database connection settings. However the user registration still happens. In the doc for Pre User Reg action, it’s mentioned that it will runs before a user is added to a Database or Passwordless Connection. I’m using Enterprise connections (Okta for now). I’ve tried Pre user action as well, Inside the script, I just tried api.access.deny(), but it doesn’t seem to be invoked.

Thanks

---

<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:** [May 16, 2024, 10:09pm UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113/5 "2024-05-16T22:09:16Z")

</div>

Hi @joe.abraham,

Thanks for the update.

Unfortunately, as you have discovered, the Pre-User Registration action only works for database and passwordless connection users. It will not work with enterprise connections.

And when using an Enterprise connection, there is no option to disable sign-ups. This is because the sign-up happens at the IdP and not at Auth0.

Is your current application allowing multiple types of connections to authenticate? Like email + password, and enterprise connections?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![joe.abraham](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe.abraham/32/49540_2.png) [@joe.abraham](https://community.auth0.com/u/joe.abraham)\
**Post date:** [May 17, 2024, 7:25am UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113/6 "2024-05-17T07:25:40Z")

</div>

Hi @rueben.tiow,

We aim to restrict users from customer organisation not yet onboarded to our application from accessing our system. Yes I know sign-up and login occur at the Identity Provider (IdP) side, our focus is on preventing non-onboarded users from registering in Auth0.

I’m exploring the recommended Auth0 approach to achieve this. Despite being unable to directly prevent user registration, I’ve implemented a workaround. By disallowing login for non-onboarded users through the Login/Post Login action, we enforce this restriction.

If there are alternative methods or suggestions from Auth0 to address this issue more effectively, I’d appreciate your guidance.

Thanks

---

<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:** [May 31, 2024, 7:25am UTC](https://community.auth0.com/t/user-registration-during-ss0-login/134113/7 "2024-05-31T07:25:56Z")

</div>

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