Mandy
Mandy

Reputation: 278

Set own event id while creating event using microsoft graph API

I'm using Microsoft Graph API for integration of microsoft/outlook calendar and events.

API Reference is here I want to specify my own custom id for event while creating an event with this rest API, but I didn't find any way to do so. It automatically created an id. Is there any way of specifying our own Id.

Following is my request:

POST: https://graph.microsoft.com/v1.0/me/events

 {
   "subject": "My event",
   "start": {
      "dateTime": "2017-10-05T07:57:45.679Z",
      "timeZone": "UTC"
  },
  "end": {
      "dateTime": "2017-10-12T07:57:45.679Z",
      "timeZone": "UTC"
  }
}

Upvotes: 2

Views: 1843

Answers (2)

Alberico Lima
Alberico Lima

Reputation: 53

One can use the optional property transactionId, reference can be found at event and create event

Be aware this property is set when creating the event by a third party app and cannot be updated later.

Upvotes: 1

Yogesh
Yogesh

Reputation: 2228

No the ids are created by Exchange and are not user definable. The best option I can think of is to add an extended property to the event:

https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/extended-properties-overview

Upvotes: 4

Related Questions