2
votes

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("[email protected]",
                                                    "password")
                };

service.AutodiscoverUrl("[email protected]", url => true);
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress,
                                                    "[email protected]");
Folder addCalendar = new Folder(service);
addCalendar.DisplayName = "Another Calendar";
addCalendar.FolderClass = "IPF.Appointment";
var perm = new FolderPermission(new UserId("[email protected]"),
                                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); 
1

1 Answers

1
votes

After doing some more searching and posting in other forums, I found out that it is not possible to restrict the permissions on any kind of item (e.g. calendar or folder) for the owner an exchange account.