Home > Perform Gmail Migrations > Delete Data from Exchange Online
Export to PDFFly provides a tool for you to delete data from Exchange Online archive/user/Microsoft 365 Group mailboxes. You can click the to download the FlyMailboxDataDeletion tool.
Before running the FlyMailboxDataDeletion tool, you need to make the following preparations:
Set-Mailbox -Identity user@contoso.com -SingleItemRecoveryEnabled $false -LitigationHoldEnabled $false
Refer to the following steps to run the FlyMailboxDataDeletion tool to delete data from Exchange Online:
Extract the downloaded ZIP file. Open the MailAddress.csv file in the folder and configure the data you want to delete as follows:
*Note: Configure each mailbox in one row and make sure all mailboxes you configured are in the same tenant.

user1@consoto.com(In-Place Archive Mailbox) – The data in the archive mailbox (user1@contoso.com) will be deleted, but the data in the Purges folder of the mailbox will not be deleted.
user1@consoto.com(In-Place Archive Mailbox)\folder1\folder2 – The folder2 of the archive mailbox (user1@contoso.com) will be deleted.
user1@consoto.com(In-Place Archive Mailbox)\Recoverable Items\Purges – The data in the Purges folder of the archive mailbox (user1@contoso.com) will be deleted.
*Note: If you want to delete all data from the archive mailbox, including the data in the Purges folder, we recommend that you delete the data from the Purges folder before deleting other data.
user2@contoso.com – The data in the user/group mailbox (user2@contoso.com) will be deleted.
*Note: For a user mailbox, the data in the Purges folder of the mailbox will not be deleted.
user2@contoso.com\folder1\folder2 – The folder2 of the user/group mailbox (user2@contoso.com) will be deleted.
user2@consoto.com\Recoverable Items\Purges – The data in the Purges folder of the user mailbox (user2@contoso.com) will be deleted.
*Note: If you want to delete all data from the user mailbox, including the data in the Purges folder, we recommend that you delete the data from the Purges folder before deleting other data.
Save the file.
Open the FlyMailboxDataDeletion.exe file with Notepad and configure the following nodes:
– Define whether to delete scanned data. Enter True or False as the value.
True – Only scan the specific data and do not delete them.
False – Scan the specific data and delete them.
*Note: Scanned empty folders will also be deleted.
– Define the data scanning scope. Enter All, Exists, or NotExists as the value.
All – Scan/delete all data in the destination, including destination original data and data migrated from the source.
Exists – Only scan/delete the data migrated from the source.
NotExists – Only scan/delete the destination original data.
– Define whether the job is to delete data from Microsoft 365 Group mailboxes. Enter True or False as the value.
True – Fly Server will delete data from Microsoft 365 Group mailboxes.
False – Fly Server will delete data from archive/user mailboxes.
Save the file.
Right-click the FlyMailboxDataDeletion.exe file and select Run as administrator to run the tool.
Enter A/a/S/s and then press Enter on the keyboard to select the authentication method.

If you use an application, complete the following steps to run the tool:
Enter the client ID of the app and then press Enter on the keyboard.
Enter the secret of the app and then press Enter on the keyboard.

If you use a service account, complete the following steps to run the tool:
Enter the username of the service account and then press Enter on the keyboard.
Enter the password of the service account and then press Enter on the keyboard.

After running the tool, you can find the report named FlyMailboxDataDeletion_ TimeStmap.csv in the same directory as the tool, and the logs named FlyMailboxDataDeletion.exe_TimeStamp.log and FlyMailboxDataDeletion.exe_TimeStamp_High.log in the Logs folder of the same directory as the tool.
If errors occur while running the tool, you can contact AvePoint Support and provide the job logs and job reports to analyze the errors.