How to Update Office 365 Groups Primary
Email
Address
How to Update the primary SMTP address of Office 365 Groups.
To do this, we must use PowerShell as it is not possible to
change the email address of such group using the EAC.
First, we connect to Exchange Online PowerShell, and
then we need to use the *-UnifiedGroup cmdlet.
To retrieve the list of groups that need to be updated, we
use the following code:
Get-UnifiedGroup
-ResultSize Unlimited | Where {$_.PrimarySmtpAddress -like
"*tenantname.onmicrosoft.com"}
To update the primary SMTP address of an Office 365 Group, we use the
Set-UnifiedGroup cmdlet with the PrimarySmtpAddress parameter:
Set-UnifiedGroup “Test Group” -PrimarySmtpAddress “test.group@nunomota.pt”
For E.g.
1. Run the below
command to add required SMTP address as an alias.
Set-UnifiedGroup -Identity "X" -EmailAddresses:
@{Add ="Y"}
here X is the Display Name of Office 365 group and Y is the
required Email ID.
Set-UnifiedGroup -Identity Test o365Group"
-EmailAddresses: @{Add ="test.o365group@abcd.com"}
2. Promote alias as a primary SMTP address,
Set-UnifiedGroup -Identity "Test O365Group"
-PrimarySmtpAddress "test.o365group@abcd.com"
3. If not required, you can remove first ID using below
command.
Set-UnifiedGroup -Identity "Test o365Group"
-EmailAddresses: @{Remove="test.o365group@abcd.onmicrosoft.com"}