Microsoft 365 Copilot Finds Teams Files From Archived Channels: Fix
🔍 WiseChecker

Microsoft 365 Copilot Finds Teams Files From Archived Channels: Fix

When you ask Copilot in Microsoft 365 a question about a Teams channel, it sometimes returns files from channels that your organization has archived. This confuses users because archived channels are supposed to be hidden and read-only. The root cause is that Copilot indexes all channel data unless an administrator explicitly excludes archived channels from the search scope. This article explains why this happens and provides the exact steps to stop Copilot from surfacing files in archived Teams channels.

Key Takeaways: Stop Copilot From Returning Archived Channel Files

  • Microsoft 365 admin center > Copilot > Data sources > Microsoft Graph: Controls whether Copilot reads data from all Teams channels, including archived ones.
  • Teams admin center > Teams > Manage teams > Archive: Archiving a channel does not automatically remove it from the Copilot search index.
  • PowerShell command Set-TeamChannel -Archived $true -ExcludeFromSearch $true: Excludes an archived channel from all Microsoft Graph searches, including Copilot queries.

ADVERTISEMENT

Why Copilot Returns Files From Archived Channels

When an administrator archives a Teams channel, the channel becomes read-only and hidden from the general Teams client. However, archiving alone does not remove the channel from the Microsoft Graph search index. Copilot uses the Microsoft Graph to find relevant data, so it can still locate and return files from archived channels. This design is intentional for compliance and eDiscovery scenarios, where archived data must remain searchable. But for everyday users, this behavior creates confusion because they expect archived content to be invisible.

How the Microsoft Graph Index Works

The Microsoft Graph index includes all Teams channels unless an administrator configures a data source exclusion policy. When a user asks Copilot a question, Copilot queries the Graph index for matching content. Archived channels remain in the index unless a policy explicitly removes them. The index refreshes every few minutes, so changes to channel status appear quickly, but the exclusion must be set at the policy level, not just at the channel level.

The Difference Between Archiving and Excluding From Search

Archiving a channel changes its visibility in the Teams client and makes it read-only. Excluding a channel from search removes its content from the Microsoft Graph index. These are two separate actions. An administrator must perform both to fully hide an archived channel from Copilot. The Teams admin center provides the archive option but not the search exclusion option directly. You must use PowerShell to apply the search exclusion.

Steps to Exclude Archived Channels From Copilot Search

Follow these steps to stop Copilot from returning files from archived Teams channels. You need Teams administrator permissions in Microsoft 365.

  1. Identify the archived channels
    Sign in to the Teams admin center at admin.teams.microsoft.com. Go to Teams > Manage teams. Select each team and review its channels. Look for channels with the status “Archived.” Write down the channel ID or the full channel name for each archived channel you want to exclude from search.
  2. Install the Teams PowerShell module
    Open Windows PowerShell as an administrator. Run the command Install-Module -Name MicrosoftTeams. If you already have the module, update it with Update-Module -Name MicrosoftTeams. Press Enter and wait for the installation to finish.
  3. Connect to Teams
    In the same PowerShell window, run Connect-MicrosoftTeams. A sign-in window appears. Enter your administrator credentials and complete the multi-factor authentication if required.
  4. Exclude the archived channel from search
    Run the following command, replacing ChannelId with the actual channel ID you noted earlier:
    Set-TeamChannel -GroupId $teamGroupId -CurrentDisplayName "ChannelName" -Archived $true -ExcludeFromSearch $true
    If you do not know the GroupId, run Get-Team -DisplayName "TeamName" | Select-Object GroupId to find it. The -ExcludeFromSearch $true parameter removes the channel from the Microsoft Graph index.
  5. Verify the exclusion
    Wait 15 to 30 minutes for the index to refresh. Then ask Copilot a question that would normally return a file from the archived channel. The file should no longer appear in the response. If it still appears, repeat step 4 and confirm the channel ID is correct.

ADVERTISEMENT

If Copilot Still Returns Archived Channel Files After the Fix

In some cases, the exclusion does not take effect immediately or a different configuration interferes. Below are specific failure patterns and their solutions.

Copilot Returns Files From Multiple Archived Channels

If you excluded one channel but Copilot still returns files from other archived channels, you need to exclude each archived channel individually. Run the PowerShell command from step 4 for every archived channel that should be hidden from Copilot. There is no bulk exclusion option in the current release.

The Exclusion Works for Some Users but Not Others

This happens when users have different Copilot licenses or data source policies. Check the Microsoft 365 admin center > Copilot > Data sources > Microsoft Graph settings. Ensure the policy applies to all users. If the policy is scoped to specific groups, add all affected users to the group. Also confirm that no other Copilot plugin, such as the SharePoint plugin, is set to include the same archived channel data.

Copilot Returns Files From an Archived Private Channel

Private channels use a separate SharePoint site for file storage. Archiving the private channel does not archive the SharePoint site. To hide private channel files from Copilot, you must also remove the SharePoint site from the search index. Go to the SharePoint admin center > Search > Search schema and exclude the site by adding its URL to the exclusion list. Alternatively, change the site permissions so that only specific users can access it.

Item Archive Only Archive + Search Exclusion
Visibility in Teams client Hidden Hidden
Read/write access Read-only Read-only
Copilot search results Files appear Files do not appear
eDiscovery search Content appears Content appears
Administrator tool required Teams admin center Teams admin center + PowerShell

Now you can control exactly which archived channel content Copilot returns to users. Start by identifying all archived channels in your tenant. Then apply the search exclusion with the PowerShell command. If you manage a large number of channels, create a script that loops through each channel and applies the -ExcludeFromSearch $true parameter automatically. This saves time and ensures no archived channel is missed.

ADVERTISEMENT