I asked Microsoft support, and they told me this can not only be done, but it can even be done by the customer, without requiring any support call.
The global configuration for the deleted items retention period is stored in the Mailbox Plans assigned to users:
PS C:\windows\system32> Get-MailboxPlan | ft Name, RetainDeletedItemsFor
Name RetainDeletedItemsFor
---- ---------------------
ExchangeOnlineDeskless-200f67ad-971f-4485-8df4-496cb337aaa0 14.00:00:00
ExchangeOnlineEnterprise-7d4dfcb8-b74f-4fbc-b154-008eba3ed7ab 14.00:00:00
ExchangeOnline-6562c5b9-cec6-4d6c-bbed-5cd1551877c7 14.00:00:00
In order to configure it, you can use the Set-MailboxPlan
cmdlet:
Get-MailboxPlan | Set-MailboxPlan -RetainDeletedItemsFor "30.00:00:00"
After doing this, the global settings will be changed:
PS C:\windows\system32> Get-MailboxPlan | ft Name, RetainDeletedItemsFor
Name RetainDeletedItemsFor
---- ---------------------
ExchangeOnlineDeskless-200f67ad-971f-4485-8df4-496cb337aaa0 30.00:00:00
ExchangeOnlineEnterprise-7d4dfcb8-b74f-4fbc-b154-008eba3ed7ab 30.00:00:00
ExchangeOnline-6562c5b9-cec6-4d6c-bbed-5cd1551877c7 30.00:00:00
This will apply the settings to all new users; however, you'll still need to modify it for existing users:
Get-Mailbox | Set-Mailbox -RetainDeletedItemsFor "30.00:00:00"
Oh man, what a mess, lets see.
The process of restoring a mailbox depends on how the mailboxes was originally deleted:
- Mailbox deleted by means of removing the Exchange License: applying an Exchange license to the user would simply reactivate the mailbox in this case, here is the correct way to do that.
- Mailbox deleted by means of deleting the original user account: recreating the user account in this case with the same mailbox ID/SMTP proxy settings will force Exchange to restore the mailbox to the user. here is the correct way to do that.
If none of those options worked, then I'd recommend you to complete delete the mailbox even from Recycle Bin and start all fresh, as follow:
- If the user is DirSynced/Federated, start by removing the user mapping so the mailbox is not connected to an Active Directory account.
- If the mailbox has a user account online, delete that account too.
- In Office 365 Admin Portal > Users > Deleted Users, verify that you can see the mailbox you want to fix (if it's not in the deleted users tap, it's still linked to an account then, verify user mapping and remove as needed)
- Connect Powershell to Office 365: https://msdn.microsoft.com/en-us/library/dn975125.aspx
- Delete the mailbox from Recycle Bin using this command:
Remove-MsolUser -UserPrincipalName "Username" -Force
-RemoveFromRecycleBin
- Recreate the user account/mailbox as needed.
Hope this helps.
Best Answer
You can use retention policy to achieve your needs. RPT(Retention policy tag) is created for default folders, you can create a tag applied to delete items folder, and then link to a retention policy. Details see: Default folders that support Retention Policy Tags