When using the management API, how to know if user already existed or s new?

I’m using this endpoint to create users with the management API. How can I know if the user already exists, or is newly created?

Hey @alexab,

You’ll get a 409 User already exists. error.

Hi @dan.woda - ok, I guess the behaviour I’m seeing is caused by the Auth0 Node.js wrapper then - because no error is thrown there. I will create an issue on the repo then.

Update - just checked the repo, and found this comment that explains.

So in other words, the 409 User already exists is only thrown if connection is not e-mail, otherwise the existing user is just returned. It’s not supposed to be easy :slight_smile:

That is certainly interesting…thanks for taking a moment to clarify.

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