Create User Function Error "The user already exists 409"

Problem statement

A user tries to sign up on an application while already being registered into an External Attached Database and gets the below error:

The user already exists 409


409 Error Message: The user already exists


When the External Database is configured with the “Import Mode” on, it will act as the source of truth for all of the users trying to connect. When there is an attempt to create a user, the Get User script is executed to first check to see if the user already exists or not.


Instead of trying to register, the user needs to just sign into the application and it will be recognized due to the “Import Mode” being enabled.