SOLVED

How to remove user from the list if user does not exist?

Copper Contributor

Hi,

I have SharePoint Online, and custom list with People Picker for User Names, we have added users in that list in the past and using that list reading our Scheduler to send email notifications. Now some of the users we removed from the Tenant and How can we check and remove user from this list?

 

Thanks,

-Sal

3 Replies
best response confirmed by Sal_Sal (Copper Contributor)
Solution

@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.

@Vikram_Samal  Thank you vikram. Can something like this I can do with designer workflow on the list?

@Sal_Sal 

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

 

1 best response

Accepted Solutions
best response confirmed by Sal_Sal (Copper Contributor)
Solution

@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.

View solution in original post