Remove the auth0| prefix from every imported user ID, because Auth0 bulk imports add that prefix automatically and an unchanged file will not keep your IDs the same. The second change is to give every account one stable ID that you assign and consistently reassign, so the same person keeps the same identifier through the move. Your privacy notice should also describe how you use these identifiers.
Everyday takeaways
- Give every account one ID that you assign and consistently reassign, as Google Analytics Help describes.
- Remove the auth0| prefix from every imported user ID before the job starts.
- Settle your identifier format and Privacy Policy wording before you build the file.
- Decide which identifier your reports should use before import, since Mixpanel Group Analysis lets you select alternative unique identifiers in reports.
Give every account one stable user ID
Before you touch an import file, decide how each existing account will be identified after the move. Google's Analytics Help page sets this requirement for user IDs sent to Google Analytics, and the Auth0 migration described here applies the same practice by analogy. It says that to send user IDs to Analytics, you need to create a unique ID for each user on your own and assign and consistently reassign the IDs to your users. The phrases that matter are "on your own" and "consistently." Your team creates these identifiers, and your team must apply the same identifier every time the same person appears.
For a bulk import, this matters because the identifier you use today is probably the one your product, reports, and support tools already reference. If an account receives a new identifier during migration, every downstream link to that account can break at the same moment. Growth leads often count the accounts they are moving and overlook that identity is the thing that has to survive the move.
A workable approach is to pick one identifier for each account, record it in a mapping file, and carry that value into the import unchanged. Keep the mapping file with the import job so anyone can trace a user from an old record to a new one. Do not wait until after the job runs to settle the mapping. By then you will have two sets of identifiers to reconcile, and reconciling them is slower than preventing the split.
Consistency also means an identifier stays with one person. If an account is closed, merged, or reactivated, its identifier should not be handed to someone else. Once an ID has belonged to one user, it should keep belonging to that user, and the mapping file should show that history.
Keep your privacy notice matched to your IDs
Changing how you identify users is also a privacy question, not only a data question. Google's guidance on sending user IDs includes two conditions. The first is avoiding the use of impermissible personally identifiable information. Those two conditions cover what goes into the identifier and what your public notice says about it.
The first condition concerns the content of the ID. A user ID should be a value your team generates, not an email address, phone number, or name. If your current identifier contains personal data, the migration is the moment to replace it, because the import will carry that value into a new system. Replacing it at this stage costs far less than replacing it after accounts have been moved and reports have been built on it.
The second condition concerns disclosure. Your Privacy Policy should describe the identifiers you use. If you move accounts into Auth0 and keep the same identifiers, the policy should still reflect that. If the identifiers change, or you add a new system that receives them, the notice may need updating before the data moves.
For a growth team, the practical sequence is short. Write the identifier format in one sentence, confirm that it holds no personal information, and read the current Privacy Policy against that sentence. Record who approved the format and attach that record to the import ticket. Do this before the file is built, because a notice that describes the wrong identifier is harder to correct once customer data has moved.
Compare the two ID options side by side
Auth0 handles the prefix during a bulk import in a way that decides whether your IDs survive. The Auth0 bulk import guide states that bulk imports automatically add the auth0| prefix to imported user IDs, while user exports generated by Auth0 already have the auth0| prefix on user IDs. The same ID therefore looks different depending on where the file came from, and the import treats each file in the same way.
The table below compares the three starting points a team usually has.
| Starting file | Prefix in the ID field | Result after bulk import |
|---|---|---|
| Your own IDs, no prefix | None | Auth0 adds its prefix, so the stored ID differs from your original |
| Auth0 export, unchanged | Prefix already present | The import adds the prefix again, so the IDs do not match |
| Auth0 export, prefix removed | None | The IDs stay the same |
The first row is the common case for a company moving its own signup accounts. The import adds the prefix on its own, so your identifiers change without any action on your part. The second row is the trap for teams that export from one Auth0 tenant and re-import without edits. The third row is the outcome the migration needs, and it requires one deliberate edit to every record before the job starts.
Choose the row before you build anything. If your data came from an Auth0 export, you are in the second row until you remove the prefix. Apply the same choice to every record so the file does not mix formats.
Format your existing users as JSON
Auth0 expects user data in a specific shape. The bulk import guide says that you first create a user data file in the JSON format Auth0 expects and then start a job to import that data using the Dashboard or the Management API. The process has two parts: build the file, then start the job. Your existing data is probably not in Auth0's format, so the first part is a conversion.
The guidance is direct about the first part. You format your existing user data into JSON for import into Auth0 by following the structure defined in the user data JSON schema and property reference. In practice, start from your current user table, map each source column to the schema property it corresponds to, and set aside any record that cannot be mapped cleanly. The schema reference decides the structure. Your own column names matter only as the source of the mapping.
Verify the ID first. Because the identifier is the field this post is about, it should be the first property you check in each record. Confirm that every record has an ID, that IDs are unique within the file, and that each one matches the value in your mapping file. Duplicate IDs in the input file create problems that are hard to trace once the job has run, so catch them here.
Test before you commit. Build a small sample file, import it into a test environment, and compare the stored results with your mapping. A sample reveals formatting errors and prefix problems before they touch every account. Build the full file only after the sample matches your mapping exactly.
Build the file to Auth0's schema
The schema is the contract between your data and the import job. The schema reference defines the required structure, and each record should be checked against it. Build the file against the schema reference rather than against an example you found elsewhere, because the reference is the document that defines the properties.
The table below shows the three formats in play during a migration and what each one means for your file.
| Stage | File format | What the sources say |
|---|---|---|
| Your current user data | Your own format | Format it into JSON following Auth0's schema |
| Bulk import input | JSON | Bulk imports support JSON format |
| Auth0 user export | NDJSON | Exports generated by Auth0 are in NDJSON format |
The contrast in the last two rows is the point. The import accepts JSON, and an Auth0 export arrives in a different format. If your source is an export, your file has to move from the export format to the import format before the job can use it. Treat that conversion as its own step, separate from the schema mapping, so you can check each one on its own.
Keep the ID property stable throughout the build. Once your mapping file assigns an identifier to an account, every version of the import file should carry that identifier in the same property. Changing the property name or value in a later build creates a second identity for the same account, which is the outcome the earlier steps are designed to prevent.
Convert NDJSON exports before importing
Migrations often start from an export, not from a clean table. The bulk import guide contrasts the two formats directly: bulk imports support JSON format, but user exports generated by Auth0 are in NDJSON format. When your source is an Auth0 export, the file you hold is not the file the import expects, and you must convert it before the job starts.
Start by confirming what you have. Open the export and check that it is the file type the guide describes, not a JSON array you may have saved earlier. Keep the original export untouched and make the conversion on a copy. That way, if a conversion step goes wrong, you can run it again from the same source rather than from a partly changed file.
Next, convert the copy to JSON and check the result against the schema reference. Confirm that each record in the converted file still carries the identifier it had in the export, and that the count of records has not changed during conversion. A conversion that silently drops or merges records will later appear as accounts that never arrived, so compare the two files before going on.
The converted file is not ready to import until the ID step is done. Your export already has the prefix on every user ID, so the prefix must come off before the job runs. That edit belongs to the next step of the process, and it should be applied to the converted copy, never to the original export.
Drop the auth0| prefix before the job runs
The edit that keeps your IDs the same is removing the prefix from every record. The bulk import guide states it directly: "To keep the same user IDs, remove the auth0| prefix from all imported user IDs." The word "all" matters. If most records are clean and a few still carry the prefix, the stored IDs will be a mix of values, and the accounts with prefixed values will be the ones your reports can no longer find.
Make the edit on the converted copy from the previous step, never on the original export. Remove only the leading auth0| from each value and leave the rest of the identifier exactly as it appears in your mapping file. Changing anything after the separator creates a new identifier, which defeats the purpose of the edit.
After the edit, check the file in two ways. First, search for any ID that still begins with auth0| and confirm the search returns nothing. Second, compare the identifiers in the edited file with the mapping file, record by record. A mismatch found here takes minutes to fix. The same mismatch found after the job has run means correcting accounts that were already stored under the wrong values.
Keep a dated copy of the edited file with the import ticket. If someone later asks why an identifier looks different from the one in the original export, that copy shows exactly what changed and when.
Why the prefix causes duplicate IDs
The problem comes from two facts that look harmless on their own. The same guide says that "Bulk imports automatically add the auth0| prefix to imported user IDs, but user exports generated by Auth0 already have the auth0| prefix on user IDs." The import adds the prefix to the IDs it receives, and an Auth0 export already contains it. If you carry an export into the import without changes, the prefix is present before the import runs and the import adds it again.
For a growth team, the consequence is that one account ends up with two identifiers: the one recorded in your mapping file and the one stored in Auth0. Your product, analytics, and support tools still point to the first. Anything that looks up the account by the stored value will find nothing, or will find a second record that looks like a new customer. This is why the section heading speaks of duplicate IDs. The two values refer to the same person, but they no longer match.
The problem is easy to miss. A successful import tells you the records were loaded, not that they were loaded under the IDs you assigned. The only reliable check is to compare the stored values with your mapping after the job runs.
Prevention is the edit described in the previous section. Remove the prefix from every record before the job starts, and treat the import as correct only after the stored IDs match your mapping.
Which one should you pick?
The choice is between leaving Auth0's prefixed form in place and storing the bare identifier your team assigned. A prefixed value is one the import adds on your behalf, so it is not an identifier your team manages in the same way. A prefixed value is one the import adds on your behalf, so it is not the identifier your team manages.
The table compares the three starting combinations a team is likely to face.
| Option | Edits for each record | Stored identifier | Keeps original IDs? |
|---|---|---|---|
| Your own IDs, imported as they are | 0 | Your ID with the auth0 prefix added | No |
| Auth0 export, prefix removed first | 1 | Your ID exactly as assigned | Yes |
| Auth0 export, imported without edits | 0 | Prefix added again to an ID that already has one | No |
It is the only option that keeps the stored ID identical to the one in your mapping file. For data that came from an Auth0 export, the third row is the one to avoid, and the second row is the fix.
Decide the reporting identifier at the same time. Mixpanel's Group Analysis documentation notes that Group Analysis lets you select alternative unique identifiers in reports. Choose which identifier your reports will use before the import, and write that decision into the mapping file. The import and the reports then refer to the same values.
Start the job and verify IDs match
Once the file is ready, the import runs as a job. The bulk import guide describes the process in two parts: you create the user data file in the JSON format Auth0 expects, and then you start a job to import that data using the Dashboard or the Management API. Pick one entry point and use it for the whole import so the run is easy to trace.
The figures in the table come straight from the guide's own wording.
| Fact from the bulk import guide | Count |
|---|---|
| Parts in the process (create the file, then start the job) | 2 |
| Ways to start the job (Dashboard or Management API) | 2 |
| File formats named for imports and exports (JSON and NDJSON) | 2 |
| Prefix to remove from each imported ID (auth0 prefix) | 1 |
After the job finishes, verify the result before you close the ticket. Compare the number of records loaded with the number in the edited file. Confirm that each stored ID equals its original export ID, including the auth0| prefix. Then pull a sample of accounts from across the file, including some with recent activity, and confirm that each stored ID matches its entry in the mapping file.
Finally, confirm that a lookup by the original identifier finds the account in the places that depend on it. A lookup in your product or analytics tools is a better test than the import log, because it checks the link that users and reports actually rely on.
Align Mixpanel group identifiers
Your analytics setup may use a different identifier from the one Auth0 stores. Mixpanel's Group Analytics documentation says that "Mixpanel Group Analysis allows you to select alternative unique identifiers in reports." This means a report does not have to rely on whichever identifier was used first. If the identifier you carried through the migration is not the one your reports used, you can choose the one that matches.
Start by listing every identifier field your reports currently use. For each report, decide which field it should select, and record that choice next to the Auth0 ID in the mapping file. Keep the columns in the same order across every version of the file, so the link between the two systems is easy to follow.
Any report that joins Mixpanel data to Auth0 data needs a shared key. Check the configuration steps in Mixpanel's documentation before you change any report, and test one report against a few known accounts before you change them all.
Related guides: 3 ways to manage an Auth0 custom screen in advanced mode · 3 signup identifiers in an Auth0 database connection · 2 Auth0 caps that can slow a signup flow before launch.
Reader questions
Do I need a unique ID for every user? Yes. Google's Analytics Help page says that to send user IDs you "need to create a unique ID for each user on your own and assign and consistently reassign the IDs to your users." The ID should be one your team creates and keeps stable through the migration.
Can I use an email address as the identifier? The Google page asks you to avoid impermissible personally identifiable information in user IDs. Google's page asks you to avoid "the use of impermissible personally identifiable information" in identifiers. A value your team generates is the safer choice, and it keeps personal details out of the identifier.
Does my Privacy Policy need to mention these identifiers? The guidance asks for "appropriate notice of your use of identifiers in your Privacy Policy," so the policy should describe the identifiers you use. What counts as appropriate for your business is a question for your legal team, so raise it before the data moves.
Why does Auth0 add a prefix to my IDs? The bulk import guide states that bulk imports automatically add the auth0| prefix to imported user IDs. That prefix is part of the stored value, so it has to be removed from your records if you want the IDs to stay the same.
Can I import the Auth0 export as it is? Not without converting it. The guide says that bulk imports support JSON, but user exports generated by Auth0 are in NDJSON format. Convert the export to JSON on a copy, then remove the prefix from the converted file.
Do I remove the prefix from every record or only some? Every record. The guide instructs you to remove the prefix "from all imported user IDs." A partial edit leaves some accounts with IDs that no longer match your mapping.
Which identifier should my reports use? Choose the identifier that your reports can select. Mixpanel's Group Analytics documentation says that Group Analysis lets you select alternative unique identifiers in reports, so decide this before the import and record the choice in the mapping file.