Forum Discussion

vand3rlinden's avatar
vand3rlinden
Brass Contributor
Sep 05, 2020

Cannot Delete a Mailbox with Retention Policies Enabled

Dear,

 

In my environment I have a retention policy in the Secure & Compliance center for Exchange Online mail. Now I have an service account that had a mailbox in the past, but not needed anymore and the service account still need to exist in the environment for some reason. If I open the user in de admin portal a message appear: "Exchange: An unknown error has occurred. Refer to correlation ID: xxx-xx-xxx". Now I got the error message with command;

(Get-MsolUser -UserPrincipalName domain@domain.com).errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDescription
Get-MsolUser -HasErrorsOnly | Format-Table DisplayName,UserPrincipalName,@{Name="Error";Expression={($_.errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDescription)}} -AutoSize

"Exchange can't disable the mailbox, because it is on In-Place Hold."

 

What I've done for trouble shooting:

 

1. Give the service account back the license, exclude him from the retention policy, wait till the policy is success and remove the license. No luck.

2. Re provision mailbox with "Redo-MsolProvisionuser -ObjectID". No luck.

3. Follow this great guide: https://masterandcmdr.com/2020/04/24/cannot-delete-a-mailbox-with-retention-policies-enabled/ No luck

 

In the guide on step 3, they are speaking over a inactive mailbox. My service account is not inactive, it still exist. I just want to delete the mailbox for this service account.

 

I hope anyone can help me out.

 

Regards,

 

Ricardo

9 Replies

Resources