Change a Microsoft Team Email Address

Who doesn’t love Microsoft Teams and Office 365 Groups? Everyone wants to use it, but as we’re adopting Teams we’re finding some limitations, too.

The organization I work for has many domains in its Microsoft 365 tenant, and unfortunately an undesirable domain was set as the default for new Office 365 Group emails and Team emails.

Unlike Distribution Lists on Exchange, there is no GUI option to change emails or to add an email alias for these new groups:

Nope. Can’t do this for an Office 365 Group / Team Email

Instead, we get to turn to PowerShell!

Exchange Online PowerShell

Fire up an Exchange Online PowerShell session. More information here for the uninitiated.

Once you’ve connected, let’s start by viewing the properties of the Team / Office 365 Group:

Get-UnifiedGroup -Identity "<Alias of Team/Group>" | fl Alias,EmailAddresses,PrimarySmtpAddress

Great! We’ve verified the properties we want to change. Let’s change them now.

Set-UnifiedGroup -Identity "<Alias of Team/Group>" -PrimarySmtpAddress "<New Email Address>"

That step is enough to change the email address. The Team should start receiving emails at this address immediately. The Global Address List will take some time to catch up.

Let’s do a bit of clean up. We can remove old email addresses from the group’s properties:

Set-UnifiedGroup -Identity "<Alias of Team/Group>" -EmailAddresses @{remove="<email to remove>"}

Also, you may want to update the alias to reflect the value of the new email. Same pattern:

Set-UnifiedGroup -Identity "<Alias of Team/Group>" -Alias "<new alias>"

Lastly, it’s never a bad idea to verify all your changes. Use the same command as before (unless you’ve changed the alias)

Get-UnifiedGroup -Identity "<Alias of Team/Group>" | fl Alias,EmailAddresses,PrimarySmtpAddress

Leave a Reply

Your email address will not be published. Required fields are marked *