Forum Discussion
seach-mailbox group mailbox
Yup, group mailboxes are not supported. Use eDiscovery/Content search in the Security and compliance center.
I have the eDiscovery Administrator role.
Is there a way to batch delete emails from a group mailbox.
I have a testing application that has sent a lot of emails to that group mailbox.
I wish to empty the entire group mailbox.
Whats the best way to do this?
- VasilMichevJun 06, 2019MVP
You can use some EWS-based script, or simply recreate the group. Should also be possible to select all messages via Outlook and delete them in one go, but I've only tested this with groups with handful of messages.
- adrianhalidJun 10, 2019Copper Contributor
Is this what you a referring to when you say EWS-based scripts?
https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/explore-the-ews-managed-api-ews-and-web-services-in-exchange
I am currently looking through the documentation trying to figure out how to get the mailbox or folder.
I have tried the select and delete all using the desktop and web client but it doesn't seem to do anything thing when I click delete all.
I can delete in batches on what is displayed on the screen. But it a tedious repetitive process. I would just like a script I can run that deletes all.
- VasilMichevJun 10, 2019MVP
Yup, that's what I'm referring to, and here's an article that talks about using EWS for Groups: https://gsexdev.blogspot.com/2015/05/using-office-365-groups-within-ews.html
You can of course also use the Graph API: https://docs.microsoft.com/en-us/graph/api/group-get-conversation?view=graph-rest-1.0&tabs=cs