[Doc Update] Graph API- get the channel name in calendar events

ChetanSharmamsft 1,026 Reputation points Microsoft Vendor
2024-05-28T18:34:08.22+00:00

Developer is utilizing the Graph API calendar resource to retrieve events (https://graph.microsoft.com/v1.0/me/calendar/events). In the event that a channel is chosen in the attendee section we have not discovered any information related to the channel in the Graph API response.

It's better to document it here:
https://learn.microsoft.com/en-us/graph/api/calendar-list-events?view=graph-rest-1.0&tabs=http

We can get the channel details of a calendar event by following below steps:

Make a call to graph "https://graph.microsoft.com/v1.0/me/calendar/events" and search for the event you created by name.

  1. Then get the joinURL property and extract the channel id
  2. Next, call graph again to list all channels and filter it with the channel id and then get the respective channel's display name.
    GET /teams/{team-id}/channels/{channel-id}
    https://learn.microsoft.com/en-us/graph/api/channel-get?view=graph-rest-1.0&tabs=http
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,886 Reputation points Microsoft Vendor
    2024-05-28T19:25:43.31+00:00

    Hello,

    Thanks for reaching Microsoft.

    An event in a user's calendar, or the default calendar of a Microsoft 365 group, is an Outlook resource. The Event Graph API will list only the available properties in its response. You can check the properties of the event resource here: https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-beta#properties

    A channel is associated with the Teams resource and does not have a direct relationship with the event resource in the current Graph API.

    Hope this helps.

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

    0 comments No comments