You can enable a feature called Access Delegation, which is used to grant administrative rights to a new user (typically, a manager) when a user's account is removed from the organization. With Access Delegation, the User Profile service sends an email to the user's manager (as specified in the User Profile properties) upon the deletion of a user account. However, if the service is unable to determine the manager (for example, the manager field was blank in the user's profile), then you can specify a secondary site collection admin to add instead.
To configure access delegation, follow the steps given here:
- Navigate to the SharePoint admin center Classic Features administration (https://admin.microsoft.com | Admin centers | SharePoint | Classic Features).
- Launch the User Profile service application.
- Under My Site Settings, select...