How to Import Users into Salesforce Using Data Loader
A Salesforce User Import is one of the first and most important tasks in any Salesforce data migration project. Importing users before other records helps preserve historical ownership, maintain audit fields such as Created By and Modified By, and establish accurate user relationships for future data imports.
In this step-by-step guide, you’ll learn how to import users into Salesforce using Data Loader, from creating a Legacy ID field and preparing your user data to mapping Profile IDs, Role IDs, and successfully importing users with a CSV file. You’ll also discover best practices for avoiding common import errors, such as duplicate usernames, alias character limits, and incorrect locale settings.
Whether you’re performing your first Salesforce migration or looking to improve your existing process, this tutorial will help you complete a Salesforce User Import accurately, efficiently, and with confidence.
Table of Contents
Why Salesforce User Import Comes First in a Data Migration
A Salesforce User Import should be one of the first steps in any data migration project. Importing users early allows you to create a user mapping table, making it easier to match historical record owners from your legacy system with their corresponding Salesforce users. This mapping is essential for preserving audit fields such as Created By and Modified By, ensuring historical data remains accurate after migration.
Before importing your user data, create a custom Legacy ID field on the User object and configure it as an External ID. This field links each Salesforce user to their corresponding record in your legacy system, making future upserts and data synchronization much more efficient throughout the migration process.
The speaker explains why user insertion is an early step in data migration.
User map, historical record owner, audit field, Created By, Modified By.Creating users early allows for the establishment of a user map, which is crucial for associating historical record owners with new Salesforce owners and for populating audit fields like “Created By” and “Modified By” with historical IDs.
Prioritize user creation to build the necessary mapping for other data objects.
Not having users in place to assign ownership to when migrating other data.
User map, historical record owner, audit field, Created By, Modified By.
Benefits of Importing Users First
Importing users before other records provides several important advantages:
- Preserves historical record ownership during migration.
- Maintains audit fields such as Created By and Modified By.
- Creates a reliable user lookup table for future imports.
- Simplifies record matching using a Legacy ID.
- Supports efficient upserts as your migration progresses.
Before You Begin
Before opening Data Loader, make sure you have:
✅ A Salesforce org
✅ Data Loader installed
✅ User workbook
✅ CSV of your users
✅ Administrator permissions
Step 1: Create a Legacy ID Field
One of the most important preparation steps is creating a Legacy ID custom field on the User object.
Configure it as:
- Text
- External ID
- Unique (Recommended)
Why is this important?
The Legacy ID connects each Salesforce user with the original system’s User ID, making future Upserts and record relationships much easier.
Step 2: Prepare Your User Data
Salesforce expects data in a very specific format.
Your spreadsheet should contain information such as:
| Field | Required |
|---|---|
| Username | ✅ |
| Last Name | ✅ |
| ✅ | |
| Alias | ✅ |
| Profile ID | ✅ |
| User Role ID | Optional |
| Legacy ID | Recommended |
Many legacy systems don’t store this information the same way Salesforce does, so you’ll often need to enrich your data before importing.
Step 4: Create User Aliases
Every Salesforce user requires an Alias.
Keep in mind:
- Required Fields: Understand fields like Last Name, Alias, Email, and Username.
- Alias: Has an 8-character limit. A common practice is to use the first initial of the first name and the last name.
Step 5: Create Unique Usernames
Salesforce usernames must:
- Look like an email address
- Be unique across every Salesforce organization
Even if another company owns the username, Salesforce won’t allow duplicates.
Step 6: Find Profile IDs
Data Loader cannot use Profile Names.
It requires the actual Salesforce Profile ID.
There are two ways:
Option 1
Navigate to:
Setup → Profiles
Open the Profile.
Copy the ID from the URL.
Option 2 (Recommended)
Export the Profile object using Data Loader.
This is much faster when importing many users.
Step 7: Find Role IDs
Role IDs work the same way.
Navigate to:
Setup → Roles
or
Export the Role object with Data Loader.
Although User Roles are optional, including them helps preserve organizational hierarchy.
Step 8: Use VLOOKUP to Map IDs
After exporting Profiles and Roles:
- Open the CSV
- Move the Name column beside the ID column
- Use VLOOKUP (or XLOOKUP)
This automatically inserts the correct Profile and Role IDs into your User spreadsheet.
Step 9: Insert Users with Data Loader
Once your CSV is complete:
- Open Data Loader
- Select Insert
- Choose the User object
- Select your prepared CSV
- Create or edit the field mapping
- Verify every field
- Click Finish
If everything is configured correctly, Salesforce will insert your users successfully.
Step 10: Save the Success File
After the import finishes: Rename the Success file.
Example: user-success.csv
Add it as a new worksheet in your migration workbook.
This file becomes your master lookup between:
- Legacy User ID
- Salesforce User ID
making future Upserts much easier.
Important Note on Usernames
- Usernames must be unique across all Salesforce orgs.
- If you use the provided test data’s usernames directly, you may encounter errors.
- Use the provided link to a data generator for fake email addresses or modify the existing ones by adding characters.
Common Mistakes to Avoid
❌ Forgetting to create a Legacy ID
❌ Using Profile Names instead of Profile IDs
❌ Alias longer than 8 characters
❌ Duplicate usernames
❌ Incorrect locale or time zone values
❌ Skipping the Success file
Salesforce User Import Best Practices
✔ Import users before Accounts or Contacts
✔ Create an External ID field
✔ Export Profiles instead of copying IDs manually
✔ Use VLOOKUP or XLOOKUP for mapping
✔ Keep inactive users inactive if licenses are limited
✔ Save Success and Error files after every import
Frequently Asked Questions
Do inactive users consume Salesforce licenses?
No. Inactive users do not require active Salesforce licenses.
Can I send welcome emails through Data Loader?
No. Data Loader cannot trigger the “Generate New Password and Notify User” option during import.
Why is the Legacy ID important?
It enables Upserts and helps maintain relationships between your historical system and Salesforce.
Do I need User Roles?
No. User Roles are optional unless your organization already uses a role hierarchy.
Do I need User Roles?
No. User Roles are optional unless your organization already uses a role hierarchy.
Watch the Full Tutorial
This guide summarizes the process, but the video demonstrates every step inside Salesforce—including creating the Legacy ID field, exporting Profiles and Roles, using VLOOKUP, preparing the CSV, and importing users with Data Loader.
2 Responses