none
Using ExchangeServiceBinding for folder permissions RRS feed

Answers

  • ExchangeServiceBinding is from the WSDL proxy objects see http://msdn.microsoft.com/en-us/library/dd877040%28v=EXCHG.140%29.aspx.

    I would suggest you just use the Managed API to set permissions which is farily easy http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.folderpermission.aspx eg

                Folder Inbox = Folder.Bind(service, WellKnownFolderName.Inbox);
                Inbox.Permissions.Add( new FolderPermission("blah@mailbox.com", FolderPermissionLevel.Editor));
                Inbox.Update();
    

    To do with with Proxy code is going to take you 30-40 lines of code.

    Cheers
    Glen

     

    • Marked as answer by sureshh Wednesday, November 23, 2011 3:56 PM
    Wednesday, November 23, 2011 5:08 AM
  • Hi Glen,

    I was very close to your solution. I created below code yesterday and missed on UserId code so it was not working. Now its working as expected once I added UserId statement below.

     

    Thanks for quick code that pointed out this issue.

     

    FolderPermission permission = new FolderPermission();

    permission.PermissionLevel = FolderPermissionLevel.Owner;

    permission.UserId = "blah@mailbox.com";

    CalendarFolder f = CalendarFolder.Bind(GetBinding(), WellKnownFolderName.Calendar);

    f.Permissions.Add(permission);

    f.Update();


    • Marked as answer by sureshh Wednesday, November 23, 2011 3:56 PM
    • Edited by sureshh Wednesday, November 23, 2011 3:56 PM
    Wednesday, November 23, 2011 3:53 PM

All replies

  • ExchangeServiceBinding is from the WSDL proxy objects see http://msdn.microsoft.com/en-us/library/dd877040%28v=EXCHG.140%29.aspx.

    I would suggest you just use the Managed API to set permissions which is farily easy http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.folderpermission.aspx eg

                Folder Inbox = Folder.Bind(service, WellKnownFolderName.Inbox);
                Inbox.Permissions.Add( new FolderPermission("blah@mailbox.com", FolderPermissionLevel.Editor));
                Inbox.Update();
    

    To do with with Proxy code is going to take you 30-40 lines of code.

    Cheers
    Glen

     

    • Marked as answer by sureshh Wednesday, November 23, 2011 3:56 PM
    Wednesday, November 23, 2011 5:08 AM
  • Hi Glen,

    I was very close to your solution. I created below code yesterday and missed on UserId code so it was not working. Now its working as expected once I added UserId statement below.

     

    Thanks for quick code that pointed out this issue.

     

    FolderPermission permission = new FolderPermission();

    permission.PermissionLevel = FolderPermissionLevel.Owner;

    permission.UserId = "blah@mailbox.com";

    CalendarFolder f = CalendarFolder.Bind(GetBinding(), WellKnownFolderName.Calendar);

    f.Permissions.Add(permission);

    f.Update();


    • Marked as answer by sureshh Wednesday, November 23, 2011 3:56 PM
    • Edited by sureshh Wednesday, November 23, 2011 3:56 PM
    Wednesday, November 23, 2011 3:53 PM