Create a properly formatted CSV file with UTF-8 encoding. The file must include specific headers that match Microsoft Graph user parameters. Save this as users.csv:
UserPrincipalName,DisplayName,MailNickname,GivenName,Surname,PasswordProfile,UsageLocation,City,Department
user1@contoso.com,"John Smith","jsmith","John","Smith","TempPass123!","US","Seattle","IT"
user2@contoso.com,"Jane Doe","jdoe","Jane","Doe","TempPass123!","US","New York","HR"
user3@contoso.com,"Mike Johnson","mjohnson","Mike","Johnson","TempPass123!","US","Chicago","Finance"
Required columns include UserPrincipalName, DisplayName, MailNickname, and PasswordProfile. Optional fields like UsageLocation are crucial for license assignment later.
Warning: Passwords must meet your tenant's complexity requirements (minimum 8 characters with uppercase, lowercase, number, and symbol). Weak passwords will cause import failures.
Verification: Open the CSV file in a text editor to ensure UTF-8 encoding and proper comma separation without extra spaces.