Others

How to Import Microsoft 365 Users from CSV with Commas in Display Names

Kushani NimanthikaKushani Nimanthika Nov 2, 2026 869 views

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.

How to Import Microsoft 365 Users from CSV with Commas in Display Names
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the CSV in a text or spreadsheet editor

Open your user list CSV file in a plain text editor like Notepad or a spreadsheet program capable of managing CSV structures.

2
Locate the Display Name column

Find the column containing the user display names formatted with commas, such as Doe, John.

3
Wrap names in quotes

Edit the field to enclose the entire name in double quotes, making it "Doe, John".

4
Save and import

Save the changes to your CSV file and proceed with the standard Microsoft 365 user import process.

Use Double Quotes for Display Names
Format Integrity: Quoting ensures the comma is treated as a regular text character rather than a structural delimiter, allowing the import to succeed.
Manage CSV Files Easily

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. 1. Open your file: Launch WPS Spreadsheet and go to 'Menu' > 'Open' to select your Microsoft 365 user-import CSV file.
  2. 2. Configure the Text Import Wizard: Choose 'Delimited', set your delimiter to 'Comma', and ensure the 'Text qualifier' is set to double quotes (").
  3. 3. Edit user data: Modify your display names and other fields. The double quotes will protect names containing commas.
  4. 4. Save as CSV: Click 'Menu' > 'Save As', select 'CSV (Comma delimited) (*.csv)' from the format dropdown, and save the file for your import.
Easily configure text qualifiers to handle commas within display names automatically.Fully compatible with Microsoft Excel (.xlsx, .csv) and Microsoft 365 import templates.Advanced Find and Replace features for quick data sanitization.Lightweight, fast, and completely free to use for daily spreadsheet tasks.
microsoft office alternative - wps office

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.