none
Exchange Web Services API: Create calendar for user with reviewer permission RRS feed

  • Question

  • I'm wondering if this is possible to set the permissions of an additional calendar (sub folder of the build in Calendar folder) in a user's Exchange account in that way that the user is not able to create, edit or delete appointments.

    I managed to create an additional calendar for the user with an impersonation account. The new calendar is accessible by the user. To revoke the permissions for the user on this folder, I set the permission level for the user on this folder to FolderPermissionLevel.Reviewer.

    But when I tested the permissions on the new calendar, the user is still able to create, edit and delete events in this calendar. At the moment I'm wondering if it is possible at all to revoke the permissions for this user as he is the owner of the whole account.

    Here's the code I used.

    ExchangeVersion exchVersion = new ExchangeVersion();
    exchVersion = ExchangeVersion.Exchange2010;
    ExchangeService service = new ExchangeService(exchVersion)
            {
              Credentials = new WebCredentials("impersonationAcc@example.com",
                              "password")
            };
    
    service.AutodiscoverUrl("impersonationAcc@example.com", url => true);
    service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress,
                              "user@example.com");
    Folder addCalendar = new Folder(service);
    addCalendar.DisplayName = "Another Calendar";
    addCalendar.FolderClass = "IPF.Appointment";
    var perm = new FolderPermission(new UserId("user@example.com"),
                    FolderPermissionLevel.Reviewer);
    
    addCalendar.Permissions.Add(perm);                
    addCalendar.Save(WellKnownFolderName.Calendar);
    
    Appointment app = new Appointment(service);
    app.Subject = "Test Appointment";
    app.Start = new DateTime(2011, 2, 14, 10, 0, 0);
    app.End = new DateTime(2011, 2, 14, 11, 0, 0);
    app.Body = "Content";
    app.Save(addCalendar.Id); 
    
    
    Monday, February 14, 2011 6:42 PM

Answers

  • No unfortunately you cant anything you create in a user mailbox the user will have full rights basically because they are the owner of the mailbox and then they get implicit rights on anything created in that container.

    Cheers
    Glen 

    • Marked as answer by Flo80 Tuesday, February 15, 2011 9:00 PM
    Tuesday, February 15, 2011 2:40 AM