How to Import Microsoft 365 Users from CSV with Commas in Display Names
Question details
The user needs to format a CSV file for importing Microsoft 365 users where display names contain commas (e.g., Lastname, Firstname) without breaking the file structure.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Importing a batch of users into the Microsoft 365 admin center using a CSV template.
- Observed behavior
- Unescaped commas in the Display Name field create unintended additional columns, causing the CSV data to misalign and the import process to fail.
Download the official Microsoft 365 user-import CSV template from the admin center to ensure you have the exact required column headers before preparing your data.
Use Double Quotes for Display Names
Enclosing fields that contain commas in double quotes prevents the system from interpreting the comma as a column separator.
In a standard CSV (Comma-Separated Values) file, commas are used to divide data into separate columns. When a data field itself contains a comma, it must be escaped to maintain the integrity of the row.
Text qualifiers (double quotes) tell the import tool to treat everything inside them as a single value.
Open your user list CSV file in a plain text editor like Notepad or a spreadsheet program capable of managing CSV structures.
Find the column containing the user display names formatted with commas, such as Doe, John.
Edit the field to enclose the entire name in double quotes, making it "Doe, John".
Save the changes to your CSV file and proceed with the standard Microsoft 365 user import process.

Reformat or Remove Commas from Display Names
If you cannot use text qualifiers, altering the display names to remove commas is the safest alternative.
Edit and Format CSV Files Seamlessly with WPS Spreadsheet
WPS Spreadsheet provides robust tools for handling CSV files, allowing you to manage delimiters, apply text qualifiers, and perform bulk edits without corrupting your Microsoft 365 import data.
- 1. Open your file: Launch WPS Spreadsheet and go to 'Menu' > 'Open' to select your Microsoft 365 user-import CSV file.
- 2. Configure the Text Import Wizard: Choose 'Delimited', set your delimiter to 'Comma', and ensure the 'Text qualifier' is set to double quotes (").
- 3. Edit user data: Modify your display names and other fields. The double quotes will protect names containing commas.
- 4. Save as CSV: Click 'Menu' > 'Save As', select 'CSV (Comma delimited) (*.csv)' from the format dropdown, and save the file for your import.

Frequently Asked Questions
Why does adding a comma in a CSV break the Microsoft 365 import?
CSV stands for Comma-Separated Values. The system uses commas to divide columns. An unescaped comma inside a name tricks the system into starting a new column, misaligning all subsequent data in that row and causing the import to fail.
Can I use semicolons instead of commas for my CSV import?
Microsoft 365's default user import template typically requires a standard comma delimiter. While some localized versions might accept semicolons, forcing a standard comma-delimited export in your spreadsheet software is the safest approach.
Does the Microsoft 365 import template support text qualifiers?
Yes, Microsoft 365 generally accepts standard CSV formatting where data fields containing structural characters like commas are enclosed in double quotes.
How do I ensure my spreadsheet software saves CSVs with standard commas?
If your regional settings default to semicolons, you can change this in Windows by going to Control Panel > Region > Additional settings, and changing the 'List separator' to a comma (,). This ensures your program saves CSVs correctly.




