Ako
Ako

Reputation: 93

Custom Event ID

When creating an event in outlook Calendar you get a generated event id and using that you can update any event you have created as described here by storing the eventId in some table and use it when updating an event, my question is: Is it possible to set that event Id on your own like in googles calendar here so that I don't need to keep track of the event id because it changes everytime you create/update and creates yet annother column in my database?

Upvotes: 1

Views: 678

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33094

The id of an event is a calculated hash value based on its metadata. When an item is moved (date, folder, calendar, etc.) the id will change.

For tracking, you should use the iCalUId property from the event. This is a guaranteed unique value that will never change. While you cannot define your own value, this GUID is absolutely safe to store and can be used to recall the event from Microsoft Graph using the $filter=iCalUId eq '{GUID}' query parameter.

Also, unlike the id, the value is available (and static) for attendees aswell (i.t. if the attendee is using GMail, Google will maintain the same iCalUId value on their end).

Upvotes: 7

Related Questions