Fixing Issues Caused By Toggling Import Mode in Custom DB

Overview

Enabling or disabling Import Mode on an active connection introduces discrepancies in user data and affects the behavior of user actions (authentication, creation, deletion, etc.).

Applies To

  • Custom Database
  • Import Mode

Cause

Solution

If a connection ends up in a state where it contains imported and external users, the solution is to:

  1. Determine which configuration is desired.

    • There are 2 configurations for custom database connections:

      1. External user store: Users are stored in an external database and accessed via Database Action Scripts.
      2. External to Auth0 user store: Users are stored in an external database and then migrated to the Auth0 user store via Automatic Migration.
  2. Remove the users who were created using the other configuration:

    1. External user store

      • Users who were created when Import Mode was disabled exist only in the Auth0 user store.
      • Delete the user within the Dashboard or via the Delete a User endpoint.
    2. External to Auth0 user store

      • Users who were created when Import Mode was enabled exist in the Auth0 user store and the internal Auth0 database.

      • Delete them from both locations:

        1. From the Auth0 user store within the Dashboard or via the Delete a User endpoint.
        2. From the internal Auth0 database via the Delete a Connection User endpoint.