Note that there are some explanatory texts on larger screens.

plurals
  1. POEWS: Calendar Sharing Invitation and Extended Properties
    primarykey
    data
    text
    <p>Ok, so far the best information I have gotten regarding this topic was on this thread: <a href="https://stackoverflow.com/questions/7503613/ews-api-create-calendar-and-share-with-reviewer-permissions?answertab=oldest#tab-top">EWS-API-Create-Calendar-and-Share-with-reviewer-permissions</a>. I tried asking this question on that thread but I actually posted it as an answer so it was removed by the admins (my bad!)</p> <p>DISCLAIMER: I am a sysadmin by trade and moonlight in development...so please excuse any misuse of terminology or confusions in verbage.</p> <p>Also, I'm working in C# here fyi.</p> <p>I have read the message protocol specs from microsoft and understand that certain extended properties need to be created on a message item to properly create a sharing invitation object I understand from the post mentioned above, I can create a message object with extended properties (<code>SetExtendedProperty(extprop,value)</code> to be exact). I understand that I must manually create the extended properties I'm setting using <code>new ExtendedProperty()</code> and populate the correct Parent GUID, HexID, and Datatype on each property. From what I can gather this is more or less a "workaround" due to there being no inherent sharing object management capabilities built into the API...</p> <p>But I've ran into a snag and need some clarification...</p> <p>I wanted to manually create a sharing invite (via the client, the "user" way), and then attach to the message in the Sent Items box of the user who sent the invitation. I wanted to enumerate all possible properties relative to what I need to use to build a similar object so I could use it as a template and compare my objects properties against the original invite. I can get the message fine and find many properties, but not any "special" ones. The only thing I can find that differentiate the message item is the fact that it's <code>IPM.Sharing</code> Item Class and that it has an attachment of <code>sharing_metadata.xml</code>.</p> <p>But am I correct in assuming now that we can create sharing invites via the API through using extended properties, that doesn't necessarily mean we can read those properties via the API??</p> <p>Everything I tried to enumerate extended properties doesn't seem to work, and always returns nothing instead of an array of extended properties. Maybe I'm not doing it right, but I wanted to ask the question before spending countless more hours trying to achieve something that's not possible.</p> <p>So if I can't properly enumerate the extended properties, is there a possibiltiy of using something like <code>ExFolders</code> or <code>MFCMAPI</code> or something to get those properties???</p> <p>Any thoughts/suggestions/critisisms?</p> <p>Thanks!</p> <p>UPDATE:</p> <p>Heres the function I'm playing with to try and create a sharing invite for a users calendar folder...I've commented where I'm stuck and what I'm not completely wrapping my head around:</p> <pre><code> public void CreateCalendarSharingRequest(string folderID, string owner, string sharedToUser) { // LOAD OUR CUSTOM PROPERTIES Guid PropertySetSharing = new Guid("{00062040-0000-0000-C000-000000000046}"); Guid PropertySetInternetHeaders = new Guid("{00020386-0000-0000-C000-000000000046}"); // Sharing Properties ExtendedPropertyDefinition PidLidSharingProviderGuid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A01, MapiPropertyType.CLSID); ExtendedPropertyDefinition PidLidSharingProvidorName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A02, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingFlavor = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A18, MapiPropertyType.Integer); ExtendedPropertyDefinition PidLidSharingRemoteStoreUid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A48, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingRemoteUid = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A06, MapiPropertyType.String); ExtendedPropertyDefinition PidTagMessageClass = new ExtendedPropertyDefinition(0x001A, MapiPropertyType.String); ExtendedPropertyDefinition PidTagNormalizedSubject = new ExtendedPropertyDefinition(0x0E1D, MapiPropertyType.String); ExtendedPropertyDefinition PidTagSubjectPrefix = new ExtendedPropertyDefinition(0x003D, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingCapabilities = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A17, MapiPropertyType.Integer); ExtendedPropertyDefinition PidLidSharingInitiatorEntryId = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A09, MapiPropertyType.Binary); ExtendedPropertyDefinition PidLidSharingConfigurationUrl = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A24, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingInitiatorName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A07, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingInitiatorSMTP = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A08, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingLocalType = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A14, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingRemoteType = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A1D, MapiPropertyType.String); ExtendedPropertyDefinition PidLidSharingRemoteName = new ExtendedPropertyDefinition(PropertySetSharing, 0x8A05, MapiPropertyType.String); // Internet Header Properties ExtendedPropertyDefinition PidNameContentClass = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "Content-Class", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingCapabilities = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Capabilities", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingConfigUrl = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Config-Url", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingFlavor = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Flavor", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingLocalType = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Local-Type", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingRemoteName = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Name", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingRemoteStoreUid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Store-Uid", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingRemoteType = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Type", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingRemoteUid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Remote-Uid", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingProviderGuid = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-Guid", MapiPropertyType.String); ExtendedPropertyDefinition PidNameXSharingProviderName = new ExtendedPropertyDefinition(PropertySetInternetHeaders, "X-Sharing-Provider-Name", MapiPropertyType.String); // Bind to the web services and currently selected folder // Get the current list of delegates for this folder ExchangeService service = GetExchangeService(); // Create a new message EmailMessage invitationRequest = new EmailMessage(service); invitationRequest.Subject = "I'd like to share my calendar with you"; invitationRequest.Body = "Send by Exchange Administrator on behalf of user"; invitationRequest.From = GetSMTPAddress(owner); invitationRequest.ItemClass = "IPM.Sharing"; invitationRequest.SetExtendedProperty(PidNameContentClass, "Sharing"); invitationRequest.SetExtendedProperty(PidTagMessageClass, "IPM.Sharing"); invitationRequest.SetExtendedProperty(PidLidSharingFlavor,0x20310); /* Indicates Invitation for a special folder */ invitationRequest.SetExtendedProperty(PidNameXSharingFlavor, "20310"); /* Text representation of SharingFlavor value */ invitationRequest.SetExtendedProperty(PidLidSharingProviderGuid, PropertySetSharing.ToString()); invitationRequest.SetExtendedProperty(PidNameXSharingProviderGuid, PropertySetSharing.ToString()); invitationRequest.SetExtendedProperty(PidLidSharingCapabilities, 0x40290); /* value for Special Folders */ invitationRequest.SetExtendedProperty(PidNameXSharingCapabilities, "40290"); /* Test representation of SharingCapabilities value */ // THIS IS WHERE IM STUCK - I understand how to set some of the properties like above, but then // it starts needing the entryID properties for the folder being shared, etc...and I'm not entirely // sure which properties I have to set and how many can/will be autopopulated by the transport provider // All i wanna do is send an invite message for sharing the calendar folder from one user to another! // Add recipient info //invitationRequest.ToRecipients.Add(sharedToUser); //invitationRequest.SendAndSaveCopy(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COUPDATE: I have been playing around with MFCMAPI so this looks to be the way to go to understand how the properties of an invite message object looks. I think I'm on the right path to being able to "construct" a sharing invite message, but the initial question remains: Is it that we can only create the object but not read the "sharing invite specific" properties via EWS?
      singulars
    2. COUPDATE 2: I'm updating as I make progress on this for future users searching for answers on how to do this) Using MFCMAPI, browse the message store for the sent item of the user who created the invite (of course this implies you can impersonate). You can find the message and export all properties of the message to an xml file. I am printing this out to sift through at leisure and will update if I make any more discoveries...
      singulars
    3. COUPDATE 3: Ok now I've found a tool called EWSEditor put out by the microsoft team. This is allowing me even better options for viewing the message and it's properties. I've found that I can use this to browse the message and the attachment with better detail. Hopefully I will be able to post something shortly with this...but I believe you have to create the Sharing Invite message, create the sharing attachment, and send those. So an add'l spec to be familiar with is the [MS-OXSHRMSG] document speicification at this [link](http://msdn.microsoft.com/en-us/library/cc425499(v=exchg.80).aspx)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload