Source Article - https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization?view=o365-worldwide


The first step is to create a content search for the related messages. Create a new search at the link below.

The search will need a unique name to run the powershell command against.

https://compliance.microsoft.com/contentsearchv2?viewid=search


Once the search is showing the mail you want, you'll need to trigger the deletion through Powershell.


For the first run, you'll need to install the new exchange online powershell module.

From and administrative Powershell window run the following command.


Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.3


The latest version numbers can be found here https://www.powershellgallery.com/packages/ExchangeOnlineManagement


Once that's installed you'll need to import the module, sign in, and run deletion command. 


Import-Module ExchangeOnlineManagement

Connect-IPPSSession

New-ComplianceSearchAction -Purge -PurgeType SoftDelete -Confirm:$False -SearchName "SEARCHNAME" 


Once the command runs you should see a status of "Starting". If you run the action command again it will give you the status and should show "Completed" after a few minutes.


Delete your search once finished.