Managing permissions on folders via EWS in Excahnge 2010 RRS feed

  • Question

  • Hi, can someone advise how one can add permissions on custom (non-standard) folders via EWS 2010. Can it be done via AddDelegate service? What wouldbe the xml in this case. I saw only example for standard built-in folders there. Thanks,



    Friday, July 8, 2011 2:37 PM

All replies

  • I am using the Managed EWS API. I just bind to the desired folder (I only need to know the Folder Id for non standard folders) and then I call Add method on Folder.Permissions (or Remove for removing). 
    Friday, March 9, 2012 12:52 PM
  • hello,

    could you give us an example please ?

    Wednesday, March 14, 2012 10:08 PM
    1. Bind to desired folder: Folder folder = Folder.Bind(exchangeService, new FolderId(folderId);
    2. Create folder permissions you want to add: FolderPermission permission  = new FolderPermission(delegateUser.UserId, FolderPermissionLevel.Owner);
    3. Add created permissions to folder: folder.Permissions.Add(permission);
    4. Update folder: folder.Update();

    delegateUser.UserId - Id of the user to who you want to add permissions.

    Thursday, March 15, 2012 9:15 AM