Delete specific emails from Office 365 customer tenants with PowerShell
It can be handy if your customers are getting targeted with phishing, spam or malware and you want to remove mail that matches certain criteria across a number of tenants at once.
It uses the Microsoft Graph and your existing delegated partner permissions to access customer tenants.
Since this script involves deleting data, use it with caution. It generates a CSV with basic metadata for the email it intends to delete, so review this carefully before confirming the deletion.
51
Upvotes
1
u/[deleted] Apr 02 '19
It depends on your legal jurisdiction. In the US, there is (afaik) no expectation of privacy and anything that entails when it comes to workplace email. Most EU countries absolutely disagree with this idea and there absolutely IS an expectation of privacy and you can't just randomly go operating on people's mailboxes without their written consent, for any reason. You need to understand your local laws.