I need to import users from an existing Okta. I am not going to connect my instance to that okta for a trickle integration, I need to bulk import with no passwords and sending out invite emails for users to set their passwords. These users will not be tenant users, they will be only application level access via a username-password user database connection.
I have been trying to determine the best approach to this but am unclear on how to accomplish this. Is the bulk import api any different than the current import UI in the tenant dashboard?
Is this process
The same as this?
https://auth0.com/docs/manage-users/user-migration/bulk-user-imports?_gl=1*17x3dob*_gcl_aw*R0NMLjE3NTk4NTI3NDMuQ2owS0NRanc5SkxIQmhDLUFSSXNBSzRQaGNxS21wYlRsamJZbnFQOEUtckVPNE5pMW1qM0VZcFhnUnNzUk9nWWNPTkV5cW95dFFEZVI4NGFBcVp3RUFMd193Y0I.*_gcl_au*Mjk0MzUwODQzLjE3NTczNDQzMTg.*_ga*MTU3MjYwMTkzNS4xNzQ5NTY0NDY5*_ga_QKMSDV5369*czE3NjEyNTMyMjEkbzUwJGcxJHQxNzYxMjUzNTg5JGo2JGwwJGgw)
And concerning the json format, If I were to strip down bare bones the only things I care about from a user: name, email, phone number, is that enough to satisfy the import format to accomplish a user import with an invite?
https://auth0.com/docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples
i.e., would this be the proper format for a user with minimal enough information:
{
“email”: “johnny.fakeuser@example.com”,
“username”: “johnnyfakeman”,
“given_name”: “Johnny”,
“family_name”: “Fakeman”
}
I am missing phone number because I didn’t see that in the format docs so unclear on how to add that.
Hi @jonathan.hughes
Thank you for reaching out to us!
The main thing that you need to look out for are the following user attributes, which are mandatory for an Auth0 user : name, nickname, picture, user_id. You can take a look at the documentation above for more information, but most of these do not actually need to be provided, as they will be automatically generated once the user is imported ( nickname is the local part of the user’s email, picture if not provided, a Gravatar image will be used etc.)
Having said this, I have tested and imported your example test user, with the Import/Export Users Extension, in a Database ( that has Password set as the Authentication Method ) and it worked, the user shows up in my tenant without a password. The only thing to keep in mind is to structure your JSON file as an array, even if you are only importing one user.
In addition, you can also use the Create import users job endpoint ( /v2/jobs/post-users-imports ) of the Management API to accomplish this, it has worked for my example without fault. The functionality is the same as with the Extension, it’s a matter of preference I would say.
You can also use our User profile attributes documentation for more information regarding the accepted user attributes, including phone_number as you have mentioned.
Hope this helped!
Gerald
I uploaded a real user with that format just to test what would happen and while it did create the user without a password, it does not send out any invite to the user. That user can login and reset/set the password on the first login using the reset password link and an email but this isn’t ideal since it would be preferrable to actually notify the user that they need to setup their account before they try to login.
There is an action on the user to send an invite but this is not an automated process for all users added and I can’t seem to find how this process would work when batch importing users.
How is that part accomplished?