A Microsoft file hosting and synchronization service.
Hi Mohammed Kasim2,
Thank you for your further explanation. Here are the answers to your questions.
1. However, you mentioned that once a user is disabled, they will be deleted, and their OneDrive files will also be deleted. Could you please verify this?
This was concluded based on our support experience. Many other users encountered the same problem and searched for our assistance because they disabled the user account from local AD. Then that account was deleted from Microsoft 365 with OneDrive deletion. Once they re-enable it from local AD, a new account with same email was created from Microsoft 365. However, it is a pretty new account and not the same as before one. So it caused some accessing issue. That is why we do not suggest you this method. For official article, there is no direct words about this, however, I found this one for your reference.
Fix site user ID mismatch in SharePoint or OneDrive - SharePoint | Microsoft Learn
2. Additionally, as you mentioned, if I set a retention period after disabling the user, the files shared by this user in OneDrive will still be accessible to others, correct?
The retention policy should be set BEFORE the user account is disabled. The retention policy only can be applied to ACTIVE OneDrive sites. If you set it after account disabling, the site might have already been deleted.
**3. Please note that I want to retain this user’s mailbox, so I have converted it to a shared mailbox and will keep the license. If I disable the user or move them to the non-Office 365 group, will the shared mailbox also be lost?**Or litigation hold i have to perform,which is better?
If you want to retain the user's mailbox, converting it to shared mailbox should be the better option. Because if you apply retenrion policy to user OneDrive, it only keeps the OneDrive site, it does not stop user account deletion. And if you disable the user or move them to the non-Office 365 group, the shared mailbox will also be lost. In this situation, you can just keep it as shared mailbox and remove license from it. License removing does not cause any data loss.
Please feel free to let me know if you have any further queries. At the same time, if the information we provided is useful to you, please vote at bottom of the answer, with your vote, other users who are facing same query can easily find this thread and check suggestion when they search on community. Your vote helps other user to resolve their queries.
Thank you for your cooperation.
Best regards,