I recently migrated our user data from our own database to Auth0 using the auto-migration feature. Each user’s original ID from our database is now stored in a app_metadata field in Auth0.
Now that that the users are in Auth0, I want to associate them with their respective organizations. However, the current import feature in Auth0 does not support including organization IDs during the import process.
After going through the Auth0 Community forum, I came across a post that suggests using the post_members endpoint to add users to organizations. This requires a way to map our original IDs (stored in app_metadata) to the corresponding Auth0 IDs.
One idea I had was to perform a bulk user export, which would include the Auth0 IDs, and then correlate them with our original IDs stored in app_metadata. Then I could use the post_members endpoint to set the organisations. However, I am unsure if this is the most efficient or best-practice way to achieve my goal.