How to fetch MS Calendar content from a calendar search result?

Dave Nicodemus 0 Reputation points
2023-12-26T21:01:42.2866667+00:00

We are using the following Graph API REST call to search calendar events:
POST https://graph.microsoft.com/beta/search/query

{
  "requests": [
    {
      "entityTypes": [
        "event"
      ],
      "query": {
        "queryString": "search-term"
      }
    }
  ]
}


We then need to fetch the content of the calendar events that are returned as JSON. We are currently using the graph API call: https://graph.microsoft.com/beta/me/events/{hitId}

Where we transform the hitId by replacing all instances of '/' charcter w/ '-' character and URL encode the result. This has worked in all of our testing, but the question is, will this work for cases of hitID that could be returned by the search?

Thanks for your time.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,309 questions
0 comments No comments
{count} votes

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.