Forum Discussion
ShreyasGupta
Jun 12, 2024Copper Contributor
How to fetch Soft Deleted mailboxes with are NOT Inactive?
I'm trying to connect Soft Deleted mailboxes using EWS Managed API and observed following behaviour when deleted: Has M365 retention policy applied pre deletion -> Removed M365 user account -> Mail...
- Jun 14, 2024There are some indirect mentions here: https://learn.microsoft.com/en-us/purview/ediscovery-content-search-reference#searching-disconnected-or-de-licensed-mailboxes
VasilMichev
Jun 12, 2024MVP
I'm not sure whether you can access those via EWS. Via PowerShell, you can do:
Get-Mailbox -SoftDeletedMailbox -Filter {IsInactiveMailbox -eq $false}
Get-Mailbox -SoftDeletedMailbox -Filter {IsInactiveMailbox -eq $false}
- ShreyasGuptaJun 13, 2024Copper ContributorYes, I fetch soft deleted mailbox using the same PowerShell command. But after that I use Exchange Web Services(EWS) Managed API to fetch root folder using ExchangeService object with autodiscovery url and mailbox impersonation.
I'm able to retrieve data with above mechanism for soft deleted mailboxes marked as Inactive. But same doesn't work for soft deleted but NOT inactive mailboxes.- VasilMichevJun 13, 2024MVPI believe such mailboxes are not available via any client/API method, even eDiscovery.
- ShreyasGuptaJun 13, 2024Copper ContributorI think so too. Is there any documentation from Microsoft confirming on this?