I am having the same issue as this poster on MSDN, but the solution given did not work:


This is also a follow-up from an earlier question of mine:


NOTE: I am using WSS 3.0, not MOSS.

I have written a query to show all deleted users from the User Information List, using a CAML query where the "Deleted" field is set to 1. I see that some users with the same account have been added multiple times. When I try to delete them using all the standard methods (SPListItem Delete() method, SPWeb Remove(), RemoveByID() methods, SiteUsers.Remove() method, ProcessBatchData, etc.) I get the same error message that poster got:

Error Message: Cannot complete this action. Please try again

Error code: -2147467259

I also can't set the Deleted flag to 0. It accepts the update, but doesn't change the record. Is there ANY way to really, actually, COMPLETELY delete a user from the User Information List? I should point out that some of these users were added programmatically, and are not tied to an actual Active Directory account. However, I have tested against valid AD accounts, too; and get the same error message.

  • Is what you are trying to do different from just deleting them via the web UI? – SpartanDonut Mar 7 '12 at 15:32
  • If you delete a user from the User Information List, either through the browser or through code, they are retained in the List with a field "Deleted" set to 1 (true). You don't see them in the list, you can only find them if you do a CAML query that specifically searches for "Deleted = 1". They will NOT appear in a CAML query that doesn't specify the Deleted field. – CigarDoug Mar 7 '12 at 15:36
  • In one site collection I am testing, the value of Web.SiteUserInfoList.Items.Count is 30, while Web.SiteUserInfoList.ItemCount is 4116! But doing a search such as Items.GetItemById will NOT show these deleted users. – CigarDoug Mar 7 '12 at 15:38
  • Why do you want to? There's a few good reasons under the bonnet why 'user' objects are persisted in this way. Note that the User Information List is not a true 'list' in the way other lists are in a site collection, because the User info list doesn't exist in an SPWeb. It's merely a more user friendly way to manage the users by giving a familiar interface. – James Love Mar 7 '12 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.