There are several Office 365 groups in the Office 365 account of our organization. Some of the groups are inactive as the necessity of forming those groups are over. Now, admins want to archive these groups. Does anyone know how to archive inactive Office 365 groups? If yes, then kindly share the methods. Thank you.”

Like this Office 365 user, many others are looking for ways to archive inactive groups in Office 365. Microsoft provides the facility of creating Groups and Teams in Office 365 for any type of collaborative work. The downside of this is the inactive and discarded groups. Usually groups are created with a purpose and naturally, are discarded after the purpose is served. While this is not an issue for Office 365, this results into GAL of the organization being flooded with groups. This is the main reason why people want to archive inactive groups in Office 365.

In this write-up, we will share the method of archiving these type of inactive groups. Continue reading to know how to archive inactive groups of O365.

Reasons for Archiving Inactive Groups in Office 365

Often we create a group in Office 365 and use it to conduct a certain project or activity. Once our need is over, we do not use that group anymore. But all the information that the group contains has to be kept for a longer period as per “compliance regime” of the organization. The best way to retain group information for compliance purposes is to archive the group. Thus the content remains available while users cannot access them. Now, we will learn how to archive the inactive groups in Office 365.

How to Archive Inactive Office 365 Groups

Theoretically, users can follow this steps to directly archive a group in Office 365:

  1. Add someone as a new group owner. (Before that, they have to be added as     a member.) It is better if this is a “special compliance     administration account” rather than being a tenant administrator.
  2. Navigate to the membership list of the group and remove all owners.
  3. Now,remove all the users from the list of membership.
  4. Confirm that the status of the group is private. This will prohibit anyone from finding the group’s documents using Delve or other search options.
  5. Change primary SMTP address of the group to block emails. Set the property     of RequireSenderAuthenticationEnabled as $True to prohibit any email from being sent to the group. In order to stop internal users from sending emails to this group. Change the primary SMTP address.
  6. Finally, hide this group to remove it from the Global Address List (GAL) of     MS Exchange.

Now, the group has been archived and hidden from the users’ view. It will also become unavailable by group-enabled applications like Planner and Teams.

“Group custom properties” can be utilized to label the group as inactive but keep for compliance. Then it will be easier to find the group at the time of requirement. Ultimately, we will have a group that is hidden while its data stays indexed and accessible for compliance purposes.

Archiving Office 365 Groups using PowerShell

Office 365 users can archive their groups by using PowerShell. They have to run a script containing these codes to archive inactive Office 365 groups.

[PS] C:\> $CheckGroup = Read-Host -Prompt “Enter alias of group that you want to archive”

$AGroup = (Get-UnifiedGroup $CheckGroup -ErrorAction SilentlyContinue)

If ($AGroup) {

Write-Host “Archiving” $AGroup.DisplayName -ForegroundColor Yellow

} Else {

Write-Host $CheckGroup “group not found – terminating”

Return }

# Current lists of admin and members get it

$CurrentOwners = (Get-UnifiedGroupLinks -Identity $AGroup.Alias -LinkType Owners | Select Name)

$CurrentMembers = (Get-UnifiedGroupLinks -Identity $AGroup.Alias -LinkType Members | Select Name)

# Add new Admin – who will access the group

$AdminAccount = “Compliance Administrator”

Add-UnifiedGroupLinks -Identity $AGroup.Alias -LinkType Members -Links $AdminAccount

Add-UnifiedGroupLinks -Identity $AGroup.Alias -LinkType Owners -Links $AdminAccount

# Remove other members and admin

ForEach ($O in $CurrentOwners) {

Remove-UnifiedGroupLinks -Identity $AGroup.Alias -LinkType Owners -Links $O.Name


ForEach ($M in $CurrentMembers) {

Remove-UnifiedGroupLinks -Identity $AGroup.Alias -LinkType Members -Links $M.Name


# Now Create SMTP Address for archived group

$OldSmtpAddress = $AGroup.PrimarySmtpAddress -Split “@”

$NewSmtpAddress = $OldSmtpAddress[0] + “_archived” + “@” + $OldSmtpAddress[1]

$AddressRemove = “smtp:”+$AGroup.PrimarySmtpAddress

# Update properties of group

Set-UnifiedGroup -Identity $AGroup.Alias -AccessType Private -RequireSenderAuthenticationEnabled $True -HiddenFromAddressListsEnabled $True -CustomAttribute1 “Archived” -CustomAttribute2 (Get-Date -Format s) -PrimarySmtpAddress $NewSmtpAddress

Set-UnifiedGroup -Identity $AGroup.Alias -EmailAddresses @{remove=$AddressRemove}

Write-Host $AGroup.DisplayName “is now archived and” $AdminAccount “is new group admin

After running this script, the group will become invisible from the O365 clients. The time will vary depending on the client. It will work fastest for OWA and slowest for Teams.

Find and Restore Archived Groups in Office 365

To find out these groups quickly, users can mark them using custom property. Use this command to mark all groups as archived:

[PS] C:\> Get-UnifiedGroup -Filter {CustomAttribute1 -eq “Archived”} | Select DisplayName

If users want to un-archive a group and return its normal status, a new owner has to assigned to the group. This new owner can add members if needed and choose whether to make this group public or private. To make the groups visible in GAL, restoration of group properties is needed. The removal of certain values, that marked the group as archived, is also needed.

[PS] C:\> Set-UnifiedGroup -Identity “ArchivedGroup” -HiddenFromAddressListsEnabled $False -CustomAttribute1 $Null -CustomAttribute2 $Null


For different reasons, users have to archive inactive Office 365 groups. They can try the method mentioned in this post to archive groups that are not in use anymore. Also, User can archive Office 365 Mailbox of groups in PST file format to save it locally. It is expected that Microsoft will provide the better option to archive inactive groups. Till then, users can try this technique without any worry.