Programmatically create a Teams Meeting for a Personal Account

macrogreg 0 Reputation points
2024-05-29T22:16:44.66+00:00

I am writing a web app that needs to create/modify/delete Teams Meetings on behalf of users who have personal Microsoft accounts, not work or school accounts.

All docs I can find seem to imply that it is not possible (details follow). Yet, the actual Teams apps do it (both, browser based, as well as the desktop versions), so there must be a way.

I'd like to learn:

  1. Is there a way to work around the public limitations and to CRUD Teams Meetings for users with personal accounts. How can I achieve it?
  2. What is the rationale for the limitation of the "normal" APIs towards personal accounts. Why does Microsoft makes it so difficult, especially in a market where their direct competitors gain ever more market share?

Context:

The public API for doing CRUD on Teams Meetings appears to be this Microsoft Graph API: https://graph.microsoft.com/v1.0/me/onlineMeetings [doc].

In the permissions sections of the respective methods it's stated that personal Microsoft accounts are not supported [example]. Indeed, I tried posting to https://graph.microsoft.com/v1.0/me/onlineMeetings using the Graph Explorer, and I got an error.

Another API that appears potentially useful is the one that manages Outlook events and allows to associate them with Teams Meetings. It's not exactly what I need, since I do not need/want to create Outlook calendar events. My app is doing the calendaring logic in a different manner, and only the actual Teams Conference Meeting entities are required. However, if it was a viable workaround, I'd consider it.

Unfortunately it does not work: The API is https://graph.microsoft.com/v1.0/me/events [doc], and it supports both, work or school account, as well as personal accounts.

In fact, this example explicitly demonstrates how to create an Outlook calendar event with an automatically associated Teams meeting by including

{
  //...
  "isOnlineMeeting": true,
  "onlineMeetingProvider": "teamsForBusiness"
}

into the request body.

However, this does not work for any of the personal accounts I tested it with. Events get successfully created, but they are not associated with any online meetings and the response field I receive is

{
  "onlineMeeting": null
}

instead of what is described in the referenced example:

{
  "onlineMeeting": {
        "joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_NzIyNzhlMGEtM2YyZC00ZmY0LTlhNzUtZmZjNWFmZGNlNzE2%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%22bc55b173-cff6-457d-b7a1-64bda7d7581a%22%7d",
        "conferenceId": "177513992",
        "tollNumber": "+1 425 555 0123"
  }
}

Notably, when I list my calendars to see their respective properties, my calendar contains the field

"allowedOnlineMeetingProviders": ["skypeForConsumer"]

, i.e. teamsForBusiness is not a listed provider, which is inline with the observed behavior. The docs state that teamsForBusiness, skypeForBusiness and skypeForConsumer are the only legal values for onlineMeetingProvider, and I need Teams, not Skype. I tried using teamsForConsumer, but that returned a bad request error. However, Microsoft's Teams app is able to create events associated with Teams Meetings on that very same calendar, so there must be a way!

So, is there a way to work around the public limitations and to perform CRUD on Teams Meetings entities for users with personal accounts? How can I achieve it?

(And, although knowing it will not affect my desired outcome, I really wonder what is the rationale for these limitations towards personal accounts. Why does Microsoft makes it so difficult, especially in a market where their direct competitors gain ever more market share?)

[This is a cross post for https://stackoverflow.com/questions/78552119/programmatically-create-a-teams-meeting-for-a-personal-account.]

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,583 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,384 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,053 questions
{count} votes