none
How can i determine if an outlook contact has been deleted using outlook web services 2007? RRS feed

  • Question

  • i am able to retrieve lists of contacts for specified mailboxes using exchange web services. my issue is that some of the contacts returned have been deleted by the outlook user, and i need to determine which ones. how can i do this?

    all the examples i've seen online use this method, but never for contacts.

    i have tried setting the Traversal property of the ItemView variable to SoftDeleted, but that does not return anything.

    below is the pertinent portion of my code:

    ItemView itemViewDeleted = new ItemView(100);
    
    itemViewDeleted.Traversal = ItemTraversal.SoftDeleted;
    
    FindItemsResults<Item> deletedItems = svc.FindItems(WellKnownFolderName.Contacts, itemViewDeleted);
    

    Tuesday, January 31, 2012 2:04 PM

Answers

  • That should work okay against the contacts folder all this is doing is querying the Dumpster of that folder however you need to consider how the contacts where actual deleted.

    The normal process a user goes through when they delete something is they hit delete in Outlook and the Item is moved into the deleted Items folder, then when the deleted Items folder is emptied by the user (or on exit etc) the items will then be softdeleted from the the deletedItems folders which means they go into the dumpster of this folder and are then available to the user from Deleted Item Recovery.

    The only reason those items would be in the dumpster of the contacts folders is if the user did a Shift-Delete which causes outlook to bypass using the Deleted Items folder.

    You can tell whats in the dumpster of a folder by using a Mapi editor like MFCMapi or Outlook Spy or just do a SoftDeleted traversal of that folder. If the contacts have just been deleted (moved to the deleted Items folder) you just need to use a normal finditems query of this folder.

    Cheers
    Glen

    • Marked as answer by RoastBeast Wednesday, February 1, 2012 5:38 PM
    Wednesday, February 1, 2012 5:58 AM

All replies

  • That should work okay against the contacts folder all this is doing is querying the Dumpster of that folder however you need to consider how the contacts where actual deleted.

    The normal process a user goes through when they delete something is they hit delete in Outlook and the Item is moved into the deleted Items folder, then when the deleted Items folder is emptied by the user (or on exit etc) the items will then be softdeleted from the the deletedItems folders which means they go into the dumpster of this folder and are then available to the user from Deleted Item Recovery.

    The only reason those items would be in the dumpster of the contacts folders is if the user did a Shift-Delete which causes outlook to bypass using the Deleted Items folder.

    You can tell whats in the dumpster of a folder by using a Mapi editor like MFCMapi or Outlook Spy or just do a SoftDeleted traversal of that folder. If the contacts have just been deleted (moved to the deleted Items folder) you just need to use a normal finditems query of this folder.

    Cheers
    Glen

    • Marked as answer by RoastBeast Wednesday, February 1, 2012 5:38 PM
    Wednesday, February 1, 2012 5:58 AM