4

I want to import all the meetings for a number of users into a database. I'm using the EWS Managed API and C#

When I import meetings from each mailbox, I might encounter the same meeting multiple times if each of the users have been invited to that meeting.

For single instance meetings I can use the value of ICalUid to get the unique ID of the meeting and so I will be able to only store one instance of it.

However, for recurring meetings it is not clear what additional field I should use (along with ICalUid) to identity each instance of a recurring meeting series.

Can I reliably use ICalRecurrenceId? Will this value ever change? Will it be consistent when the meeting instance is imported from multiple mailboxes? Is there a better field that I can/should use to meet my needs?

Note - I've looked at using the ItemId field but this returns a different value when the same meeting is returned from different mailboxes. I need to be able to identity a meeting instance regardless of what mailbox it was imported from.

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Kevin Brady
  • 1,684
  • 17
  • 30

2 Answers2

2

This question has been here for years but I hope this answer gives some information for people who need.

  • ICalUid: is the UID of the meeting and will not be changed across calendars.
  • ICalRecurrenceId: is the original start time of each occurrence of the recurrence meeting.
  • All the occurrences of a recurrence meeting will have same ICalUid but ICalRecurrenceId will be different.
  • On start time modification of an occurrence, ICalUid and ICalRecurrenceId will not be changed.
  • On start time modification of a recurrence meeting, ICalUid will be retained but the ICalRecurrenceId will be changed for all occurrences

So to resolve your problem, the combination of the two values will be good enough.

Han
  • 3,272
  • 3
  • 24
  • 39
  • Is that true that `ICalRecurrenceId` always eq to `originalStart`? So in the case of "on start time modification of a recurrence meeting", every occurrence will change its `originalStart` as well? – Anderson Nov 23 '22 at 08:19
  • `ICalRecurrenceId` will not be changed if it is Occurrence(Exception) change. If you update the series, actually the whole existing occurrences will be replaced so for the `ICalRecurrenceId` of each. I'm not sure about the `originalStart`. In the RFC spec the `ICalRecurrenceId` is not necessarily stored as time value, can be other kinds of data but microsoft uses the time value. – Han Nov 24 '22 at 06:19
  • So for time-wise, you'd better go with `originalStart`. Combination of `ICalUid ` and `ICalRecurrenceId` is to identify an occurrence of a series meeting. – Han Nov 24 '22 at 06:20
0

I've not tried using ICalRecurrenceId, but it's possible that ICalUID + Start (DateTime) should allow to properly identify.

pjneary
  • 1,136
  • 6
  • 8
  • But if a specific instance of a recurring meeting series is updated and moved to a different time will ICalUID + Start (DateTime) point to the new updated time or the original instance time? I need to be able to correctly identity each instance so I know to update the instance in my DB and not insert a new record – Kevin Brady Aug 11 '16 at 15:40
  • Yes, that would be a problem. – pjneary Aug 12 '16 at 14:58
  • From my experiments, the `ICalRecurrenceId` does not change, even if the start datetime of an occurrence is changed. It's the original start time for the occurence. Thus, the `ICalUid` combined with the `ICalRecurrenceId` can be used to identify a single occurrence across different mailboxes. (Han's answer seems correct.) – LukeSolar Aug 25 '21 at 16:07