This API creates a standalone meeting that isn't associated with any event on the user's calendar; therefore, meetings created via this API aren't shown on the user's calendar.
This API doesn't create a Teams live event.
To be able to retrieve meeting transcripts at a later stage, use the Create event API that is calendar-backed.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permissions for the following HTTP request:
POST /me/onlineMeetings
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
OnlineMeetings.ReadWrite
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Not supported.
Not supported.
Permissions for the following HTTP request:
POST /users/{userId}/onlineMeetings
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
OnlineMeetings.ReadWrite
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
OnlineMeetings.ReadWrite.All
Not available.
Note
To use application permission for this API, tenant administrators must create an application access policy and grant it to a user to authorize the app configured in the policy to create online meetings on behalf of that user (with user ID specified in the request path).
HTTP request
To create an online meeting with delegated (/me) and app (/users/{userId}) permission:
POST /me/onlineMeetings
POST /users/{userId}/onlineMeetings
If the request contains an Accept-Language HTTP header, the content of joinInformation will be in the language and locale variant specified in the Accept-Language header. The default content is in English.
Request body
In the request body, supply a JSON representation of an onlineMeeting object.
Caution
Assigning the presenter or coorganizer role to users who aren't registered in Microsoft Entra ID isn't currently supported.
Response
If successful, this method returns a 201 Created response code and an onlineMeeting object in the response body.
Examples
Example 1: Create an online meeting with user token
The following example creates an online meeting with a user token.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new OnlineMeeting
{
StartDateTime = DateTimeOffset.Parse("2019-07-12T14:30:34.2444915-07:00"),
EndDateTime = DateTimeOffset.Parse("2019-07-12T15:00:34.2464912-07:00"),
Subject = "User Token Meeting",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.OnlineMeetings.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewOnlineMeeting()
startDateTime , err := time.Parse(time.RFC3339, "2019-07-12T14:30:34.2444915-07:00")
requestBody.SetStartDateTime(&startDateTime)
endDateTime , err := time.Parse(time.RFC3339, "2019-07-12T15:00:34.2464912-07:00")
requestBody.SetEndDateTime(&endDateTime)
subject := "User Token Meeting"
requestBody.SetSubject(&subject)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
onlineMeetings, err := graphClient.Me().OnlineMeetings().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OnlineMeeting onlineMeeting = new OnlineMeeting();
OffsetDateTime startDateTime = OffsetDateTime.parse("2019-07-12T14:30:34.2444915-07:00");
onlineMeeting.setStartDateTime(startDateTime);
OffsetDateTime endDateTime = OffsetDateTime.parse("2019-07-12T15:00:34.2464912-07:00");
onlineMeeting.setEndDateTime(endDateTime);
onlineMeeting.setSubject("User Token Meeting");
OnlineMeeting result = graphClient.me().onlineMeetings().post(onlineMeeting);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.online_meeting import OnlineMeeting
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OnlineMeeting(
start_date_time = "2019-07-12T14:30:34.2444915-07:00",
end_date_time = "2019-07-12T15:00:34.2464912-07:00",
subject = "User Token Meeting",
)
result = await graph_client.me.online_meetings.post(request_body)
Example 2: Create an online meeting that requires a passcode
The following example shows how to add a passcode to a meeting. The passcode is used when you join a meeting with a joinMeetingId. For more information, see joinMeetingIdSettings.
Request
Here's an example of a request.
Note: The passcode is automatically generated and a custom passcode isn't supported.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new OnlineMeeting
{
StartDateTime = DateTimeOffset.Parse("2019-07-12T14:30:34.2444915-07:00"),
EndDateTime = DateTimeOffset.Parse("2019-07-12T15:00:34.2464912-07:00"),
Subject = "User meeting",
JoinMeetingIdSettings = new JoinMeetingIdSettings
{
IsPasscodeRequired = true,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.OnlineMeetings.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OnlineMeeting onlineMeeting = new OnlineMeeting();
OffsetDateTime startDateTime = OffsetDateTime.parse("2019-07-12T14:30:34.2444915-07:00");
onlineMeeting.setStartDateTime(startDateTime);
OffsetDateTime endDateTime = OffsetDateTime.parse("2019-07-12T15:00:34.2464912-07:00");
onlineMeeting.setEndDateTime(endDateTime);
onlineMeeting.setSubject("User meeting");
JoinMeetingIdSettings joinMeetingIdSettings = new JoinMeetingIdSettings();
joinMeetingIdSettings.setIsPasscodeRequired(true);
onlineMeeting.setJoinMeetingIdSettings(joinMeetingIdSettings);
OnlineMeeting result = graphClient.me().onlineMeetings().post(onlineMeeting);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.online_meeting import OnlineMeeting
from msgraph.generated.models.join_meeting_id_settings import JoinMeetingIdSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OnlineMeeting(
start_date_time = "2019-07-12T14:30:34.2444915-07:00",
end_date_time = "2019-07-12T15:00:34.2464912-07:00",
subject = "User meeting",
join_meeting_id_settings = JoinMeetingIdSettings(
is_passcode_required = True,
),
)
result = await graph_client.me.online_meetings.post(request_body)
Example 3: Create an online meeting that doesn't require a passcode
When isPasscodeRequired is set to false or when joinMeetingIdSettings isn't specified in the request, the generated online meeting won't have a passcode.
POST https://graph.microsoft.com/v1.0/me/onlineMeetings
Content-Type: application/json
{
"startDateTime":"2019-07-12T14:30:34.2444915-07:00",
"endDateTime":"2019-07-12T15:00:34.2464912-07:00",
"subject":"User meeting in Microsoft Teams channel.",
"joinMeetingIdSettings": {
"isPasscodeRequired": false
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new OnlineMeeting
{
StartDateTime = DateTimeOffset.Parse("2019-07-12T14:30:34.2444915-07:00"),
EndDateTime = DateTimeOffset.Parse("2019-07-12T15:00:34.2464912-07:00"),
Subject = "User meeting in Microsoft Teams channel.",
JoinMeetingIdSettings = new JoinMeetingIdSettings
{
IsPasscodeRequired = false,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.OnlineMeetings.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewOnlineMeeting()
startDateTime , err := time.Parse(time.RFC3339, "2019-07-12T14:30:34.2444915-07:00")
requestBody.SetStartDateTime(&startDateTime)
endDateTime , err := time.Parse(time.RFC3339, "2019-07-12T15:00:34.2464912-07:00")
requestBody.SetEndDateTime(&endDateTime)
subject := "User meeting in Microsoft Teams channel."
requestBody.SetSubject(&subject)
joinMeetingIdSettings := graphmodels.NewJoinMeetingIdSettings()
isPasscodeRequired := false
joinMeetingIdSettings.SetIsPasscodeRequired(&isPasscodeRequired)
requestBody.SetJoinMeetingIdSettings(joinMeetingIdSettings)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
onlineMeetings, err := graphClient.Me().OnlineMeetings().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OnlineMeeting onlineMeeting = new OnlineMeeting();
OffsetDateTime startDateTime = OffsetDateTime.parse("2019-07-12T14:30:34.2444915-07:00");
onlineMeeting.setStartDateTime(startDateTime);
OffsetDateTime endDateTime = OffsetDateTime.parse("2019-07-12T15:00:34.2464912-07:00");
onlineMeeting.setEndDateTime(endDateTime);
onlineMeeting.setSubject("User meeting in Microsoft Teams channel.");
JoinMeetingIdSettings joinMeetingIdSettings = new JoinMeetingIdSettings();
joinMeetingIdSettings.setIsPasscodeRequired(false);
onlineMeeting.setJoinMeetingIdSettings(joinMeetingIdSettings);
OnlineMeeting result = graphClient.me().onlineMeetings().post(onlineMeeting);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\OnlineMeeting;
use Microsoft\Graph\Generated\Models\JoinMeetingIdSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new OnlineMeeting();
$requestBody->setStartDateTime(new \DateTime('2019-07-12T14:30:34.2444915-07:00'));
$requestBody->setEndDateTime(new \DateTime('2019-07-12T15:00:34.2464912-07:00'));
$requestBody->setSubject('User meeting in Microsoft Teams channel.');
$joinMeetingIdSettings = new JoinMeetingIdSettings();
$joinMeetingIdSettings->setIsPasscodeRequired(false);
$requestBody->setJoinMeetingIdSettings($joinMeetingIdSettings);
$result = $graphServiceClient->me()->onlineMeetings()->post($requestBody)->wait();
Import-Module Microsoft.Graph.CloudCommunications
$params = @{
startDateTime = [System.DateTime]::Parse("2019-07-12T14:30:34.2444915-07:00")
endDateTime = [System.DateTime]::Parse("2019-07-12T15:00:34.2464912-07:00")
subject = "User meeting in Microsoft Teams channel."
joinMeetingIdSettings = @{
isPasscodeRequired = $false
}
}
# A UPN can also be used as -UserId.
New-MgUserOnlineMeeting -UserId $userId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.online_meeting import OnlineMeeting
from msgraph.generated.models.join_meeting_id_settings import JoinMeetingIdSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OnlineMeeting(
start_date_time = "2019-07-12T14:30:34.2444915-07:00",
end_date_time = "2019-07-12T15:00:34.2464912-07:00",
subject = "User meeting in Microsoft Teams channel.",
join_meeting_id_settings = JoinMeetingIdSettings(
is_passcode_required = False,
),
)
result = await graph_client.me.online_meetings.post(request_body)
POST https://graph.microsoft.com/v1.0/me/onlineMeetings
Content-Type: application/json
{
"startDateTime":"2019-07-12T14:30:34.2444915-07:00",
"endDateTime":"2019-07-12T15:00:34.2464912-07:00",
"subject":"User meeting in Microsoft Teams channel."
}
Response
Here's an example of the response.
Note: The response object shown here might be shortened for readability.