Auth0 Home Blog Docs

Types of `user_id` allowed?



I seem to be able to create Users via the management API that I can not retrive.
user_ids like CK10596 and u22759of6c92c seem to work fine. But I also have uids like

If I want to create a User with the user_id email@example.comtwice I get an “400: The user already exists” on the second try - which is correct.
But If I then try to get the user via /api/v2/users/ I get a “404: The user does not exist.” - so I wonder if I’, there is an API limitation or just encoding issues in the Python Library I use.

Pseudo code is like this:

payload = {
    "connection": 'DefaultDatabase',
    "password": credential.secret,
    "user_id": credential.uid,
    newuser = auth0api.users.create(payload)
except Auth0Error as ex:
    if ex.status_code == 400 and ex.message == u'The user already exists.':
            newuser = auth0api.users.get('auth0|{}'.format(credential.uid))
        except Auth0Error as ex:
            if ex.status_code == 404 and ex.message == u'The user does not exist. ':
                # WTF? First we get told it does exist
                # then they complain it does not?


I think it’s an issue with the Python Library. See


But this still seems not to be the (only) issue.

I still have instances where auth0api.users.create({'connection': 'DefaultDatabase', 'user_id': u'CK10001', …}) fails with 400: The user already exists.

But auth0api.users.get('auth0|CK10001') fails with 404: The user does not exist..

Is there any way to do a “get or insert” or make auth0api.users.create() return the conflicting user?


The issue is that all users need to have different E-Mail Addresses. See