Item:

Change the email address of an Office 365 group.
For example, if you create an Office 365 group when the default domain was domainA.com – then the group would have an email address at domainA.com, even if you change the domain name.

Method:

1/ Connect to Exchange Online via Powershell first,

2/ Run the command below. For example, we are changing the email address for the group “PartyPlanners” to “pp@domainB.com”:

Set-UnifiedGroup -Identity “PartyPlanners” -PrimarySmtpAddress pp@domainB.com

Links: