Assign Users to Organizations after auto-migration from Custom Database

Problem Statement

When using the “Import users to Auth0” feature with custom databases, it is not possible to also add the user as a member to a predefined organization.


The import organization feature is not available currently. There is a product backlog item to track this request. The ETA is not available yet.

As an alternative you can create the organizations and add users to the organizations.

Two ways to create organizations:

  1. Use the create organization endpoint to create each organization.
  2. Add the organizations manually on the Auth0 dashboard.

To add members to an organization, send request to the post_members endpoint by providing the list of the user_ids. Please be noted that user_id should include both connection type and id, such as auth0|110615.

To automate this completely, you could implement your code in the Custom Database login script, call your own API from the login script. Once users are created by your login script, call the endpoints shared previously to automatically add the membership to the organization.