In Exchange Online (or M365) the Set-Mailbox -PrimarySmtpAddress cmdlet doesn't work anymore. Use the -WindowsEmailAddress parameter instead.
Example
The objective is to change the primary SMTP address for our user Alice from alice@protectigate.com to alice.schmidt@protectigate.com
1. Open a PowerShell session to Exchange Online.
2. Run the following cmdlet to set the primary address for Alice:
Set-Mailbox alice@protectigate.com -WindowsEmailAddress alice.schmidt@protectigate.com
Community Questions