Please note that Q&A forum is a public platform, and moderators will modify the question to hide personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
Hi @Rishabh Sarang
Thank you for posting your question in the Microsoft Q&A forum.
Based on the information you described, I understand that you are facing the following challenge:
-When you create a calendar event, it appears correctly on the user’s calendar, but you do not receive a usable Teams meeting ID.
-When you create an online meeting, you receive a meeting ID, but no calendar event is created.
Your requirement is to create a single Teams meeting that:
- Appears correctly on the user’s calendar as an event, and
- Provides a stable Teams meeting ID for tracking and future operations.
Based on my research, I’ll address each of your questions below.
- Recommended / supported approach to create a Teams meeting with a calendar event
The supported approach is to create the meeting through the Create Event API with Teams enabled. This ensures that the meeting appears correctly on the user’s calendar and includes the Teams join information. When creating the event, include:
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness"
This will automatically insert the Teams meeting join details into the calendar event (assuming the tenant supports Teams as an online meeting provider, and you can verify this using GET /me/calendar and checking allowedOnlineMeetingProviders).
However, the Create Event API does not return the Teams meeting ID in its response. Instead, it only returns the join information (such as onlineMeeting.joinUrl). At this time, there is no API that allows you to create a calendar event and receive the Teams meeting ID in a single step.
- How to correctly retrieve or map the Teams meeting ID from a calendar event
After the event is created, you can retrieve the Teams meeting ID by performing an additional Graph query. The key is to use the join information from the event to locate the corresponding onlineMeeting resource.
The Calendar API response does not directly expose onlineMeeting.id. It only provides onlineMeeting.joinUrlor sometimes conferenceId. To retrieve the full Teams meeting ID, you can do the following:
For newly created events
Retrieve onlineMeeting.joinUrl from the event > Call:
GET /me/onlineMeetings?$filter=joinWebUrl eq '{joinUrl}'
The response will include the corresponding
onlineMeeting.id(the Teams meeting ID).
For existing events
- Call:
GET /me/events/{eventId}?$select=isOnlineMeeting,onlineMeeting
This is currently the only practical way to map a calendar event to its corresponding Teams meeting ID.
- Is there an official way to link an existing onlineMeeting to an event after creation?
At this time, there is no officially supported way to link a pre-existing onlineMeeting resource to a calendar event after the event has been created. The event resource in Microsoft Graph does not expose any property that allows you to directly assign or inject a Teams meeting ID. Once an event is created, you cannot PATCH it to attach an existing online meeting and replace the Teams meeting link with another one. Attempting to PATCH onlineMeeting incorrectly may result in a brand-new Teams meeting being created, rather than linking to the existing one.
Please refer the following documents:
https://learn.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/choose-online-meeting-api
I hope this explanation helps clarify the behavior and provides a practical path forward for your implementation.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.