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

3 thoughts on “Change a Microsoft Team Email Address”

  1. Hey there,
    Thank you very much for this streamlined guide!
    Everythinig worked as you described it EXCEPT changing the Alias…
    I made sure everything is typed in the correct way but as soon as I send the command I get the error:

    Cannot bind parameter ‘Alias’ to the target. Exception setting “Alias”: “Alias: Property expression
    “swac@oschwald.onmicrosoft.com” isn’t valid. Valid values are: Strings formed with characters from A to Z (uppercase
    or lowercase), digits from 0 to 9, !, #, $, %, &, ‘, *, +, -, /, =, ?, ^, _, `, {, |, } or ~. One or more periods may
    be embedded in an alias, but each period should be preceded and followed by at least one of the other characters.
    Unicode characters from U+00A1 to U+00FF are also valid in an alias, but they will be mapped to a best-fit US-ASCII
    string in the e-mail address, which is generated from such an alias.”
    At D:\Temp\tmp_rqrzvifo.u24\tmp_rqrzvifo.u24.psm1:72132 char:9
    + $steppablePipeline.End()
    + ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (:) [Set-UnifiedGroup], ParameterBindingException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.Exchange.Management.RecipientTasks.SetUnifiedGroup

Leave a Reply

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