Bulk Change Microsoft 365 Education User Addresses to a College Domain
Question details
Change more than 2,000 Microsoft 365 Education accounts from onmicrosoft.com addresses to a verified college domain while preserving their username prefixes.

- Product
- Microsoft 365 Education
- Device & OS
- not provided
- Scenario
- A college has added and verified its domain and wants to migrate existing users' sign-in names and primary email addresses in bulk.
- Observed behavior
- The accounts currently use onmicrosoft.com addresses. The goal is to retain the part before the @ symbol and use the college domain for sign-in and email.
In the Microsoft 365 admin center, check Settings > Domains to confirm that the college domain is verified, and determine whether users are synchronized from on-premises Active Directory. Review DNS and mail-routing requirements before changing mail flow, and identify the administrators and permissions needed for Microsoft Graph and Exchange Online.
Update Cloud-Managed Accounts in Tested PowerShell Batches
Use Microsoft Graph for sign-in names and Exchange Online PowerShell for mailbox addresses when many cloud-managed accounts need to change.
A user principal name (UPN) controls sign-in, while the primary SMTP address controls the main mailbox address. Changing one does not reliably change the other, so plan and verify both.
For directory-synchronized users, make the appropriate changes in the authoritative on-premises directory and Exchange management tools instead of applying this cloud-only procedure. Check email address policies and any federation requirements before proceeding.
Connect to Microsoft Graph PowerShell with Connect-MgGraph -Scopes "User.ReadWrite.All", then export a baseline with Get-MgUser -All -Property Id,DisplayName,UserPrincipalName,Mail | Select-Object Id,DisplayName,UserPrincipalName,Mail | Export-Csv users-before.csv -NoTypeInformation. Separately export or record mailbox aliases and license assignments; the user export alone does not include them.
Create a CSV containing UserId, NewUPN, OldPrimarySmtp, and NewPrimarySmtp columns. Keep each existing prefix before @, replace only the domain, and check for duplicate or conflicting sign-in names and email addresses. Start with a small group of cloud-managed users who have mailboxes.
Install or load the Microsoft Graph and Exchange Online PowerShell modules, then run Connect-ExchangeOnline. Use appropriately authorized administrator accounts for both services and confirm the batch CSV points to the intended users and mailboxes.
For a reviewed pilot.csv, run: Import-Csv pilot.csv | ForEach-Object { try { Update-MgUser -UserId $_.UserId -UserPrincipalName $_.NewUPN -ErrorAction Stop; Set-Mailbox -Identity $_.OldPrimarySmtp -PrimarySmtpAddress $_.NewPrimarySmtp -ErrorAction Stop } catch { Write-Warning "Failed or partially updated: $($_.UserId) - $($_.Exception.Message)" } }. Investigate every warning before retrying; a UPN change may have succeeded even if the mailbox update failed.
In the Microsoft 365 admin center and Exchange admin center, check pilot users' sign-ins, primary addresses, aliases, licenses, and inbound and outbound mail. Confirm the old onmicrosoft.com addresses remain as aliases if needed, adding any missing aliases through mailbox settings. Once the pilot passes, repeat with reviewed batches and track results.

Change a Single User in the Microsoft 365 Admin Center
Use the admin center for an individual account or a small pilot before planning a larger migration.
Review Your User Migration List in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar interface for reviewing migration lists and other Office files. WPS Spreadsheets can help you inspect CSV batches, but Microsoft 365 administration tools are still required to change accounts and mailboxes.

Frequently Asked Questions
Does changing a user's sign-in name also change their email address?
Not reliably. Check the UPN in Microsoft 365 and the primary SMTP address in the Exchange admin center, and update each as needed.
Can users keep receiving mail at their old onmicrosoft.com addresses?
They can if those addresses remain as mailbox aliases. After the change, check aliases in the Exchange admin center and add the old address if it is missing and still needed.
What if accounts are synchronized from on-premises Active Directory?
Update the relevant attributes in the authoritative on-premises directory and Exchange management tools, then allow synchronization to run. Do not assume a cloud-only PowerShell update will persist.
Is verifying the college domain enough to receive email?
No. Domain verification establishes ownership; receiving mail also depends on DNS records, mail routing, and mailbox configuration. Review the domain's DNS setup and test mail flow before and after the transition.




