none
[E2010 / E2013 / Exchange-Online][??][C#][Windows]: Can I prevent folder deletion? RRS feed

  • Question

  • First off, apologies for the vague categorisation of my title - I'm not sure where (if anywhere) my query fits in the Exchange development world.

    I have an add-in for Outlook which creates folders in a user's mailbox. I would like these folders to only be controlled by the add-in, and I don't want the user to wreak havoc on the hierarchy. From Outlook itself, this is easy to control through the events in the Outlook Object Model.

    The tricky part for me is that Outlook is obviously not the only client that can connect to a mailbox. They might connect via OWA, or via the Android app or whatever.

    I can take the approach of just "healing" the hierarchy from Outlook upon start-up, so that any undesired changes made from other clients are reverted. That would work fine, but it's not exactly a seamless user experience.

    So, this is what has brought me to the Exchange development forums: is there a way for me to control (or prevent) the deletion of folders from a user's mailbox on the server-side?

    Obviously I don't want to prevent deletion of ALL folders - just the ones created by my add-in. To this end I can distinguish them by setting some named property which I would check at the appropriate time.

    Is there anywhere in the Exchange development stack that functionality like this could be achieved?

    If not - am I over-complicating this? Is there some way to make MAPI folders read-only so the clients can't even attempt to delete them in the first place? (everything I've read on this topic seems to revolve around permissions, which I'd rather avoid).

    Anyway, thanks for taking the time to consider my query here - I have no prior experience of Exchange development, so I may be totally off the mark here.

    Regards,
    Chris

    Friday, January 3, 2014 3:02 PM

Answers

  • No there is nothing at the Exchange level that will protect the folders. The closest thing would be EWS notifications but these are asynchronous so they will just notify you of a change after it has happened(you could write a watcher the catches and the tries to undo what the user has done). Managed Folders did provide the functionality you want but have now been deemphasized and discontinued. Even retention policy/tags in an Exchange Mailbox is now all user administrated.

    This question get asked now and again and I've never seen a solution that worked in a Mailbox that used permissions (IRM offers some protect of emails but has a specific purpose). Using the Add-in in the way you are is the only solution I know of.

    Cheers
    Glen


    • Edited by Glen ScalesMVP Sunday, January 5, 2014 10:46 PM
    • Marked as answer by Chris McA Tuesday, January 7, 2014 11:41 AM
    Sunday, January 5, 2014 10:45 PM

All replies

  • How you are planning to install the Add-In? Will it be for all the users or single user?
    You can integrate the Add-In with Exchange using AD group Policy.

    Post the question here for some answers from them too
    http://social.technet.microsoft.com/Forums/office/en-US/home?forum=outlook


    Cheers,

    Gulab Prasad,

    Technology Consultant

    Blog: www.exchangeranger.com  Twitter:    LinkedIn:   
    Check out CodeTwo’s tools for Exchange admins   

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Saturday, January 4, 2014 7:58 PM
  • No there is nothing at the Exchange level that will protect the folders. The closest thing would be EWS notifications but these are asynchronous so they will just notify you of a change after it has happened(you could write a watcher the catches and the tries to undo what the user has done). Managed Folders did provide the functionality you want but have now been deemphasized and discontinued. Even retention policy/tags in an Exchange Mailbox is now all user administrated.

    This question get asked now and again and I've never seen a solution that worked in a Mailbox that used permissions (IRM offers some protect of emails but has a specific purpose). Using the Add-in in the way you are is the only solution I know of.

    Cheers
    Glen


    • Edited by Glen ScalesMVP Sunday, January 5, 2014 10:46 PM
    • Marked as answer by Chris McA Tuesday, January 7, 2014 11:41 AM
    Sunday, January 5, 2014 10:45 PM
  • No there is nothing at the Exchange level that will protect the folders. The closest thing would be EWS notifications but these are asynchronous so they will just notify you of a change after it has happened(you could write a watcher the catches and the tries to undo what the user has done). Managed Folders did provide the functionality you want but have now been deemphasized and discontinued. Even retention policy/tags in an Exchange Mailbox is now all user administrated.

    This question get asked now and again and I've never seen a solution that worked in a Mailbox that used permissions (IRM offers some protect of emails but has a specific purpose). Using the Add-in in the way you are is the only solution I know of.

    Cheers
    Glen


    Hm, that's a shame. Thanks for the info Glen, I appreciate you taking the time to consider my problem.

    I guess the "self-repair" route will have to do for now!

    Chris

    Tuesday, January 7, 2014 11:43 AM
  • Just wondering if users need to be able to see these folders? If you're just storing data in them you could use hidden folders, which would prevent users from tampering with them. May not be applicable, but it came to mind.
    Thursday, January 9, 2014 5:30 AM
    Moderator
  • Just wondering if users need to be able to see these folders? If you're just storing data in them you could use hidden folders, which would prevent users from tampering with them. May not be applicable, but it came to mind.

    Unfortunately they do need to see them :)

    What would be perfect would have been a property on the MAPI folders which specified which type of clients they were visible to. I can only dream!

    Thursday, January 9, 2014 7:42 PM