Sandbox Error: undefined when creating a user using Management API

Hello and Good day!

We are trying to create a user using the Management API while connected using a Custom Database with the Import Users to Auth0 option enabled. When looking at the other similar questions, they all solved their issues by taking a look at their action database scripts for create user. However, since we have the Import Users option on, only the login and getUser scripts are accessible. I can post the two scripts if need be, but using the save and try function, both are correctly returning the user details from the legacy DB.

How can we further move forward with this issue?

Thanks in advance!

I was able to solve it, it DID have something to do with the database scripts, particularly the getUser script.

Instead of
if (err || result.rows.length === 0) { return callback(err || new WrongUsernameOrPasswordError(email)); }

We changed it to
if (err || result.rows.length === 0) return callback(err);

And the create user requests started working :+1:

1 Like

Wooohooo perfect and thanks for sharing that with the rest of community!

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