Configuration of Delete job in Teams archive
Introduction
The Delete from Teams archive job removes team messages and files with expired retention time from the archive. This page describes how to create and configure the job, including its running mode, scheduling, processing and filtering settings, resource allocation, and notification options.
Create the job
- Go to Jobs.
- Click + new.
- Select Delete from Teams archive.

On the job's configuration page, configure the sections described below.
Running mode settings (mandatory)
The job can run in three modes:
- Immediate processing – collects the expired items and deletes them.
- Create report – collects the expired items and provides a CSV file with a list of documents. The administrator can remove documents/messages from the list before the deletion takes place.
- Apply report – requires uploading a CSV file with a list of items to be deleted. The administrator can remove documents and messages from the list before running the job (only items remaining in the list will be processed). The job reads the list and deletes the documents/messages that are expired.
Scheduling settings (mandatory)
Select the running times of the Delete job. You can either select a scheduler from the list or create a new one using the Create new … option.
Processing settings
You may enable the Delete even if not marked for delete checkbox. If enabled, the Delete job will delete expired items even if they are not marked for delete.
Address book objects to process (mandatory)
Select the team(s) to be processed. Two options are available:
- All teams – the job deletes items from all previously provisioned and archived teams.
- Selected teams – teams are added manually, one by one, using the select option. Click select to open the Team selection dialog.

Processing and filtering settings (mandatory and optional)
Select what will be processed during the Delete job. First, choose between all data and selected data. With all data, the Delete job processes all channels' messages, files, and non-channel related SharePoint data.
When selected data is chosen, the Filter team data settings appear, offering the following options:

- Process all channels (or filter them out) – decide whether all channels' items will be deleted or only items matching the defined filtering settings. Channels can be filtered by name or type (
IsPrivate=Yes/No).
Note: The default channel in Teams is General, which is created automatically with the team. This channel is displayed in the background as "General" regardless of the language set by users in the Teams client. Therefore, when filtering out the default channel by name, it must be entered in English. Other channels can be filtered using the supported languages. Otherwise, the job will not process this channel.
- Process messages where filter is [not set] – select this checkbox to delete messages (all or filtered) from the archive. If no filter is added, all messages will be processed from the defined channels. Click the Change filter button (or not set) to open the Filtering settings window and define which messages will be processed or skipped.

- Process files where filter is [not set] – select this checkbox to delete files (all or filtered) from the archive. If no filter is added, all files will be processed from the defined channels. Click the Change filter button (or not set) to open the Filtering settings window and define which files will be processed or skipped.

- Process non-channel related SharePoint data – SharePoint is deeply integrated into Teams. Files stored in Teams reside in SharePoint sites, which Teams uses for file storage (these are called Teams-connected sites). These sites are created automatically whenever a user creates a team. Files stored in both Teams and SharePoint sites can be processed using the Process files option, but items available only on the SharePoint sites (lists, tasks, calendar items, contacts, manually created document/picture libraries) are skipped by that option. To delete those items, select Process non-channel related SharePoint data. This option allows you to process or skip custom SharePoint lists/document libraries. For more information about the Teams and SharePoint integration, see this article.

Important: The Process non-channel related SharePoint data option does not work on its own. The Process files option must also be selected, otherwise the job will run without doing anything. However, the files can be easily filtered out (for example: AND archive date has value=No / NOT storage equals CA_ret), so that only the SharePoint data is processed.
Important: Setting the filters is optional, but selecting the items to process is mandatory. If none of these options are selected, the job runs without doing anything.
To configure the filtering settings, click Change filter or not set and define the filters according to your needs and/or regulations. To learn more about working with filtering settings, see the Filtering in jobs page.
Notification settings (mandatory)
Specify when notification emails should be sent from the Delete job. You can choose to always receive notifications, never receive them, or only receive them if an error or warning occurred during the process — for example, if deleting one or more items failed. In the Recipient list textbox, enter the email addresses of the recipients. Separate multiple addresses with , or ;.
Resource settings (mandatory)
Set the value that determines how many items will be processed simultaneously by the Delete job. The recommended value is 2.
When configuration is complete, click Save in the upper-left corner of the UI to save the job.