Guide

Automation Action: Archive or Unarchive a Team

This automation action allows you to archive or unarchive a team automatically. The action is under the type “Archiving”.

  • Once you select this action, you will need to complete the following:
  • Team: Choose a Team ID or enter it manually. Alternatively, if the automation is running from a Team Check, enter {{Team.TeamId}}.
  • Action: Choose to Archive or Unarchive the specified Team.
  • Click “Save”.
Info: This will enable or disable the "Archive" mode for the team as detailed here.
The Automation does not archive content in the team by transferring it to an external archive system.
Caution: Before the automation Action can run, it requires the specific permission: Read and change all teams' settings. This permits Rencore Governance to read and change all teams' settings without a signed-in user.

Automation Template: Archive Unused Teams

The Automation Template “Archive Unused Teams”, once enabled, would automatically archive teams.

Trigger

The automation runs on the trigger “on policy violation” and the policy “Inactive Teams”.

The “Inactive Teams” check has the following Logic:

  • Report a violation for every: “Team

    • Filter Conditions: “Last Message Is Posted” [More than] 6 months ago.
  • and that all: “SharePoint Site Collections

    • Filter Conditions: “Last Used” [Is More Than] 6 months ago.
  • and that No: “Teams Private Channel Site Collections

    • Filter Conditions: “Last Used” [Is Less Than] 6 months ago.
  • and that Any: “Teams Private Channel Site Collections

    • Filter Conditions: “Last Used” [Is Less Than] 6 months ago.
Caution: Before enabling the Automation, it is recommended to edit or clone this check and alter it to your desired logic.

Automation

The automation has two actions present, the first is to archive the team the second is to send an email to the owner.

  • Archive or Unacrive a Team

    • Team: This is set to {{Team.TeamId}}.
    • Action: The action is set to archive.
  • Contect Change

    • From Team to Teams Owners.

    • Send email

      • Execute For: Team > Teams Owners (run this action for each Teams Owner).

      • To: This is set to **{{User.UserEmail}}**.

      • Cc: This is currently blank.

      • Subject: Team {{ParentTeam.DisplayName}} has been archived.

      • Body: Dear {{User.FirstName}} {{User.LastName}},
        The Microsoft Teams team {{ParentTeam.DisplayName}} has been archived automatically because no messages have been posted and no files used or modified in the last 6 months.
        Best regards

        The Teams administration team.

Info: The Placeholder Explained:
{{Team.TeamId}} will pull the TeamId from the results of the check.
{{User.UserEmail}} will pull the email address of each owner of the Team.
{{ParentTeam.DisplayName}} will pull the Display Name for the Team.
{{User.FirstName}} Will pull the Firstname of the Owner.
{{User.LastName}} Will pull the Lastname of the Owner.

Last updated: 7/2/2025