Notify a user that he is part of another organization

If a user has an account already, how can we tell the person that he can NOT sign up or join a new organization because he is part of another organization?

For now, when he tries to sign up for a new account, an error is thrown “WE’RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO SIGN UP”. This error message is very confusing.

Hi @swifteam,

Thanks for reaching out to the Auth0 Community!

I understand that you are looking for a way to notify users that they belong in another Organization when they attempt to sign up with a new Organization.

First, let me explain that the error thrown is a generic error that gets displayed whenever a user is unable to sign up with your application. There could be several reasons why this happens, but, there isn’t a specific error message that can target Organization users.

However, if you would like to change that error message, I recommend modifying Lock’s languageDictionary object to your preferred error message.

Please see this reference for the signup object.

As an alternative, there is the option to use a Pre-User Registration Action to prevent the user from signing up if they belong to an existing Organization.

One option is to set the Organization name into the user_metadata for a quick lookup or to directly call the Management API Get User Organizations endpoint. With this information, you can conditionally allow/deny them to sign up.

I hope this helps!

Please let me know how this goes for you or if you have any questions.

Thank you.

1 Like