Outlook addin - how to get unique new event id

Dimitrios Gkiokas 45 Reputation points
2025-01-16T12:07:23.4333333+00:00

Hi,

We are developing an Outlook addin, and we want to save an event id for a new Outlook event so we can associate the new event with the state of our app.

We read that the Outlook API does provide unique event id but only if the event is saved.

Can we use that since first something happens in our app that mutates our app state, and after that the user may save the event?

Thanks.

Outlook | Windows | Classic Outlook for Windows | For business
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2025-01-17T10:04:21.92+00:00

    Hi @Dimitrios Gkiokas

    You can try using the Graph API to get the event ID.

    GET https://graph.microsoft.com/v1.0/me/events?$select=id,subject
    Prefer: outlook.timezone="Pacific Standard Time"
    

    However, if the user moves the event to another calendar, the event ID might change. One way to solve this problem is to use an immutable ID.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.