2

Is it possible to share extended properties with invited attendees of an Exchange appointment? In other words, is it possible to create a meeting in Exchange using EWS which would pass it's extended properties (custom fields) to attendee's copies of the meeting (assuming they use Exchange as well)?

So far non of the options I tried worked - I can only see the properties in the organizer's meeting through both EWS and Outlook.

A peace of working example or explanation of solution would be great.

UPDATE. Based on this thread here's what I tried (and it didn't work):

var exchangeAppointment = new Appointment(exchange);

...

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "keyword", MapiPropertyType.String);
exchangeAppointment.SetExtendedProperty(extendedPropertyDefinition, "value");

var sendModeForSave = SendInvitationsMode.SendToAllAndSaveCopy;
await exchangeAppointment.Save(sendModeForSave);

foreach (var email in command.MeetingAttendeeEmails) {
    exchangeAppointment.RequiredAttendees.Add(email);
}

var sendModeForUpdate = SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy;
await exchangeAppointment.Update(ConflictResolutionMode.AlwaysOverwrite, sendModeForUpdate);
vhe
  • 23
  • 4

1 Answers1

1

You could create appointment with custom properties in EWS, then view custom extended properties by using the EWS Managed API 2.0

You could refer to this code:

   PropertySet YourProperyset = new PropertySet(BasePropertySet.FirstClassProperties);
    var extendendProperty = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Address, "organizer",MapiPropertyType.String);
    YourProperyset.Add(extendendProperty);
    var folderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox(userName));
    var calendar = CalendarFolder.Bind(service, folderId);
    var calendarView = new CalendarView(start, stop);
    calendarView.PropertySet = YourProperyset;
    return calendar.FindAppointments(calendarView).ToList();

For more information, you could refer to these link:

Create appointment with custom properties in EWS

Viewing custom extended properties by using the EWS Managed API 2.0

Set CustomProperties on appointment for all attendees

Alina Li
  • 884
  • 1
  • 6
  • 5
  • Thanks the info, but unfortunately I still can't make it work. I followed all information provided in the last link, but I still cant see the property in attendee's calendar item nor inbox item (I'm using MAPI to inspect the items). – vhe Oct 18 '18 at 08:52
  • Please also note that I'm using Office365 accounts. – vhe Oct 18 '18 at 08:52
  • Do you have any idea what could be the problem? – vhe Oct 18 '18 at 08:52
  • You could refer to this link: https://stackoverflow.com/questions/24526704/ews-create-appointment-in-exchange-with-extra-custom-properties – Alina Li Oct 18 '18 at 09:19
  • Thanks, I have already seen it. Note that I'm able to see the properties in the organizer's meeting, so it's not a problem with the way I read properties (and I double-check that with MAPI editor). The problem is the properties are not sent with the invitation. – vhe Oct 18 '18 at 09:25
  • You could refer to these links: https://stackoverflow.com/questions/17641738/bind-custom-extended-property-for-existing-appointment-using-ews-managed-api-2-0 https://stackoverflow.com/questions/28550495/php-ews-set-multiple-extended-properties-on-calendar-item – Alina Li Oct 18 '18 at 09:47
  • Sorry, but that's unrelated to the problem I describe – vhe Oct 18 '18 at 09:55
  • I hope this link will help for you: https://stackoverflow.com/questions/9958535/ews-calendar-sharing-invitation-and-extended-properties – Alina Li Oct 18 '18 at 10:03
  • Sorry, but it seems unrelated as well – vhe Oct 18 '18 at 10:25
  • Do you want to add custom properties to attendee’s Calendar item? – Alina Li Oct 18 '18 at 10:38
  • 1
    Yes. I'm one step further to solving this. Now I figured out that it actually works if all attendees are in the same domain (from the same Office 365 subscriptions I guess). I'd like to know the exact way this works - is it even possible to achieve it for attendees on different domains? – vhe Oct 18 '18 at 11:01
  • @vhe According to my search, if you want to share to account in different tanant, you should enable external sharing. Please refer to this link: https://support.office.com/en-us/article/calendar-sharing-in-office-365-b576ecc3-0945-4d75-85f1-5efafb8a37b4?ui=en-US&rs=en-US&ad=US – Alina Li Oct 23 '18 at 07:41
  • @vhe: how did you make it work? I'm facing same issue, how to share the extended properties to all attendees? – Han Jun 19 '20 at 07:12