User deletion should remove access for any shared files/folders
An employee leaves the company and his user is removed from the Microsoft 365 admin center through Active Directory synchronization.
Due the OneDrive retention settings the content is still available for the defined period and can be accessed or restored by using PowerShell.
During the retention period other users are still able to access any shared content in OneDrive (sharing links still active).
A solution is necessary if the company requires that shared content should not be accessible if the user leaves the company. Or when the OneDrive is moved to the site collection recycle bin users realize late that they can no longer access the shared content.
Would be great if access for any shared file/folder is removed automatically at the time the user is deleted in Microsoft 365.
There are scripts available to do this, but it would be good if there is a general solution. https://www.michev.info/Blog/Post/3018/remove-sharing-permissions-on-all-files-in-users-onedrive-for-business