Forum Discussion
How to remove user from the list if user does not exist?
- Sep 09, 2019
Sal_Sal Hi there. You want to remove users in a list column and these users gets notification from the scheduler. One approach could be, you can modify your scheduler code which will check the users first and then if they see the requested user is not valid anymore can be removed from the list item and then can be replaced with some generic account or emptied which will let you know the users who are invalid.
Second approach is have complete separate scheduler which runs less often dues this type of clean up job from multiple lists of libraries.
please let me know if this helps.
Usually when user account is deactivated in active directory, it adds '$$$' in the display name of user. So checking $$$ in the display name could be one check before you try to send an email would be one option.
You can also check if below links help you.
https://docs.microsoft.com/en-us/sharepoint/remove-users