MS Graph API: Filter Calendar Events

Volodymyr Holovko 41 Reputation points
2022-12-06T15:28:30.693+00:00

I am creating some event in my calendar using MS Graph api. I have a unique ID and I need to put it in some property (except subject) so that in the future this event can be fetched by this property and this ID by Graph api. location/displayName, body/content, transactionId, can't be filtering.
So what string properties of events can be filtered except 'subject'? Or what property are I need to use for input there my unique ID?

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Shivam Dhiman 6,081 Reputation points
    2022-12-06T23:47:43.757+00:00

    Hi @Volodymyr Holovko

    To store Unique-Id you can use single-value extended property. Please refer to this example to create singleValueExtendedProperties.

    Post creating singleValueExtendedProperties you can use filter to get only those events with your custom value.

    Please refer to this sample request: https://graph.microsoft.com/v1.0/me/events?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {66f5a359-4659-4830-9070-0114*****} Name Custom_Property_Testing' and contains(ep/value, 'Think'))

    If you want to expand singleValueExtendedProperties also while filtering please refer to the below sample screenshot.
    267972-svep.png

    Please refer to this documentation for more details.

    Hope this helps.

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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.