Nov 04 2020 03:49 AM
Nov 04 2020 08:27 AM
If you have dirsync enabled, you cannot make such changes directly in ExO. Your on-premises AD is the "master" and O365 admin interfaces will always throw a similar error.
The only workaround for this scenario is to use the -WindowsEmailAddress parameter:
Set-Mailbox user@domain.com -WindowsEmailAddress new@domain.com
which will set new@domain.com as the new primary SMTP address, while keeping the old one as secondary. This still does not guarantee that the change will not be overwritten during the next full sync cycle, moreover it's not an officially supported mehtod.
Nov 04 2020 08:29 AM
Jan 20 2023 01:06 PM
@VasilMichev from where do you run this command? I tried to do so from O365 cloud PowerShell but the Get-Mailbox command is unknown, even after running: Install-Module MSOnline
and Import-Module MSOnline. Thank you
Jan 29 2023 03:04 AM - edited Jan 29 2023 03:04 AM
@cameronshove
To run get-mailbox or set-mailbox, you need to be connected to the exchange online PowerShell module. The one you were connected to is for MSOL service.
Use the commands below. A sample is also shown in the attached screenshot.
Once you authenticate with the admin account, you will be able to run the CMDLETS under exchange online. However, some EXO commands requires additional permission to be assigned to the account that is being used.
Jan 29 2023 05:15 AM