Changing the primary email address of an Office 365 Group

1 minute read

Sometimes users change their mind and an office 365 group now needs to be a shared mailbox or they didn’t like the email address they created in the first place.

The process

  1. Connect to EXOL online (Read this post for more infomation) Connecting to Services.
  2. Run the below command to add the required SMTP address as an alias. $UPN is the current Primary Email address and $newUPN is what you would like to change it too. Example below
$UPN="[email protected]"
$NewUPN="[email protected]"

Set-UnifiedGroup -Identity "$UPN" -EmailAddresses: @{Add ="$NewUPN"}
  1. Promote alias as a primary SMTP address, Set-UnifiedGroup -Identity $UPN -PrimarySmtpAddress $NewUPN
  2. If not required, you can remove first ID using below command. Set-UnifiedGroup -Identity $NewUPN -EmailAddresses: @{Remove=$UPN}

Please note, For updating the Office 365 group SMTP address required Global Administrator access.

Bonus

I was doing this to migrate an O365 group to a Shared Mailbox, the below you can use to add the UPN to a shared Mailbox.

$SharedUPN = "[email protected]"
Set-Mailbox $sharedUPN -EmailAddresses @{Add=$UPN}

This post is a “just for documentation (JFD)” post which I use for my reference, but I have made public as it may be useful. I put less time into these posts as they are my reference. If you would like more information or some help post a comment, and I can see what I can do.

Updated:

Leave a comment