I'm having some trouble on creating and share a calendar with review permissions using Exchange Webservice API .NET.
At the moment this is my code:
Folder addCalendar = new Folder(service);
addCalendar.DisplayName = name;
addCalendar.FolderClass = "IPF.Appointment";
var perm = new FolderPermission(new UserId("reviewer@test.com"),
FolderPermissionLevel.Reviewer);
addCalendar.Permissions.Add(perm);
addCalendar.Save(WellKnownFolderName.MsgFolderRoot);
The calendar is created, in my account I can see the calendar and the user 'reviewer@test.com' has the correct permissions.
The problem is: The calendar doesn't show at the reviewer's account.
You have to do two things:
Set the appropiate permissions:
Then, send an invitation message. Now, this is the hard part. The message format is specifified in [MS-OXSHARE]: Sharing Message Object Protocol Specification. The extended properties are defined in [MS-OXPROPS]: Exchange Server Protocols Master Property List. You need to create a message according to that specification and send it to the recipient.
EDITED:
To set the sharing properties on the element, use extended properties.
First, define the properties. For example, the PidLidSharingProviderGuidProperty is defined as follows:
You can then set the property on a new item using the SetExtendedProperty method:
I figured out how to programmatically send a sharing invitation within an organization through EWS. May not answer all your questions, but it's a good start to understanding how in-depth you gotta get to actually do it. Heres the link