Teams Channel Auto-Archive

What it does

Detects channels with no activity for a set period and archives them, ensuring Teams stays organized and secure.

Why I recommend it

Old channels clutter search, expose outdated files, and confuse employees. Automation keeps workspace lean without manual auditing.

Expected benefits

  • Easier navigation for employees
  • Reduced security surface area
  • Clear ownership of active projects
  • Compliance-friendly record keeping

How it works

Daily check via Graph API -> evaluate last message timestamp + membership -> if >60 days inactive and not flagged as permanent -> archive channel and notify owners with ability to restore.

Quick start

Generate a report of inactive channels and manually archive a few to show improvement.

Level-up version

Apply retention labels, capture transcripts before archiving, and auto-create SharePoint snapshots for legal hold.

Tools you can use

Collaboration: Microsoft Teams, SharePoint

Automation: Power Automate, Azure Functions

Reporting: Power BI for channel metrics

Also works with

Slack channel lifecycle management, Google Chat Spaces.

Technical implementation solution

  • No-code: Power Automate scheduled flow -> Graph API list channels -> archive if inactive -> post summary in admin channel.
  • API-based: Azure Function runs query -> writes report -> archives via API -> logs to SharePoint list.

Where it gets tricky

Channels used for compliance/announcements that shouldn’t close, ensuring owners approve archiving, and handling private channels with unique permissions.