Fix Teams Archive Policy Does Not Run after a Tenant Rename
🔍 WiseChecker

Fix Teams Archive Policy Does Not Run after a Tenant Rename

After renaming your Microsoft 365 tenant, the Teams archive policy may stop running. This usually happens because the policy still references the old tenant domain. The archive policy fails silently, and users never see their chat history moved to the archive mailbox. This article explains why the rename breaks the policy and gives you exact steps to fix it. You will also learn how to verify the fix and avoid the same problem in the future.

Key Takeaways: Restore Teams Archive Policy After a Tenant Rename

  • Teams admin center > Messaging policies > Archive policy: Check the assigned policy name and confirm it points to the new tenant domain.
  • PowerShell cmdlet Set-TeamsArchivePolicy: Update the ArchiveDomain parameter to the new tenant domain to re-enable archiving.
  • Teams admin center > Users > Manage users > Policies: Verify the effective archive policy assignment for each affected user.

ADVERTISEMENT

Why a Tenant Rename Breaks the Teams Archive Policy

When you rename a Microsoft 365 tenant, the primary domain changes. For example, your tenant might change from contoso.onmicrosoft.com to fabrikam.onmicrosoft.com. Teams archive policies store the archive domain in their configuration. If the policy still contains the old domain, Teams cannot locate the archive mailbox. The result is that the policy runs but fails silently, and no chat history is archived.

The archive policy is a messaging policy in Teams. It defines which users have archiving enabled and where the archived content goes. The ArchiveDomain parameter holds the domain of the archive mailbox. After a tenant rename, this parameter does not update automatically. You must update it manually using PowerShell.

Another factor is the timing of the rename. If you rename the tenant while an archive policy is active, the policy may become orphaned. The policy still exists, but its domain reference is invalid. Teams does not throw an error. It simply skips the archiving process for all affected users. This makes the issue hard to detect because no error appears in the Teams admin center.

What the Archive Domain Controls

The ArchiveDomain parameter tells Teams where to send archived chat messages. It is a required field when you create a new archive policy. If you leave it empty or use the wrong domain, the policy does not work. In a tenant rename scenario, the domain is wrong because it still points to the old tenant name.

Steps to Fix the Teams Archive Policy After a Tenant Rename

Follow these steps in order. You need Teams admin credentials and the Teams PowerShell module installed.

  1. Connect to Teams PowerShell
    Open Windows PowerShell as an administrator. Run the command Connect-MicrosoftTeams. Sign in with an account that has the Teams Administrator or Global Administrator role.
  2. List all archive policies
    Run Get-CsTeamsMessagingPolicy | Where-Object {$_.ArchiveState -eq 'Enabled'}. This shows every policy that has archiving enabled. Note the Identity of each policy.
  3. Check the current ArchiveDomain value
    Run Get-CsTeamsMessagingPolicy -Identity "Global" and look for the ArchiveDomain field. If it still shows the old tenant domain, you have found the problem.
  4. Update the ArchiveDomain parameter
    Run Set-CsTeamsMessagingPolicy -Identity "Global" -ArchiveDomain "newtenant.onmicrosoft.com". Replace newtenant.onmicrosoft.com with your new tenant domain. If you have multiple policies, run this command for each one.
  5. Verify the change
    Run Get-CsTeamsMessagingPolicy -Identity "Global" again. Confirm that ArchiveDomain now shows the new domain. Also confirm that ArchiveState is still set to Enabled.
  6. Test archiving for a single user
    Ask one user to send a chat message. Wait a few minutes, then check the user’s archive mailbox in Exchange admin center. If the message appears, the fix is working.

If You Have Custom Archive Policies

Custom policies are separate from the Global policy. Run the same PowerShell commands for each custom policy. Replace the Identity with the name of your custom policy. For example, Set-CsTeamsMessagingPolicy -Identity "SalesArchive" -ArchiveDomain "newtenant.onmicrosoft.com".

If You Cannot Find the ArchiveDomain Parameter

The ArchiveDomain parameter is only visible when ArchiveState is set to Enabled. If you do not see ArchiveDomain, check that ArchiveState is Enabled first. Run Get-CsTeamsMessagingPolicy -Identity "Global" | Format-List to see all properties.

ADVERTISEMENT

If Teams Archive Policy Still Does Not Run

Teams Archive Policy Shows the Old Domain in the Admin Center

The Teams admin center may cache the old domain. Sign out and sign back in, or use an InPrivate window. If the old domain still appears, your PowerShell change did not save. Run the Set-CsTeamsMessagingPolicy command again and check for errors.

Users See an Error When Opening Archived Chats

This error means the archive mailbox is still connected to the old tenant. You may need to re-run the archive policy after the domain update. Ask the user to restart Teams. If the error persists, check the user’s archive mailbox in Exchange admin center. The mailbox should show the new tenant domain.

Archive Policy Runs but Chat History Is Empty

This can happen if the policy was broken for a long time. Teams may have skipped archiving during the broken period. You can manually trigger archiving by changing the ArchiveState to Disabled and then back to Enabled. Use Set-CsTeamsMessagingPolicy -Identity "Global" -ArchiveState Disabled and then Set-CsTeamsMessagingPolicy -Identity "Global" -ArchiveState Enabled.

Teams Archive Policy After Tenant Rename: PowerShell vs Admin Center

Item PowerShell Teams Admin Center
Update ArchiveDomain Yes, with Set-CsTeamsMessagingPolicy No, not available
View ArchiveState Yes, with Get-CsTeamsMessagingPolicy Yes, under Messaging policies
Assign policy to users Yes, with Grant-CsTeamsMessagingPolicy Yes, under Users > Manage users > Policies
Detect broken domain Yes, shows old domain No, shows only policy name

The Teams admin center does not let you edit the ArchiveDomain field. PowerShell is the only way to fix the broken reference. Use the admin center to verify user assignments, but use PowerShell to update the policy itself.

Now you can update the ArchiveDomain parameter and restore Teams archiving after a tenant rename. Test the fix with a single user before applying it to the whole organization. For future tenant renames, change the archive policy domain immediately after the rename to avoid silent failures. Use PowerShell to check the ArchiveDomain value right after any domain change.

ADVERTISEMENT