APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID.
Note: The meeting does not show on the user's calendar.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
OnlineMeetings.ReadWrite
Delegated (personal Microsoft account)
Not Supported.
Application
OnlineMeetings.ReadWrite.All*
Important
* Administrators must create an application access policy and grant it to a user, authorizing the app configured in the policy to create or get an online meeting with external ID on behalf of that user (user ID specified in the request path).
The participants associated with the online meeting. This includes the organizer and the attendees.
startDateTime
DateTime
The meeting start time in UTC.
subject
String
The subject of the online meeting.
Notes:
If the startDateTime and endDateTime are not provided, the startDateTime will default to the current dateTime value and endDateTime value will equal the startDateTime + 1 hour.
If the startDateTime is provided, but endDateTime is not, the endDateTime value will equal the startDateTime + 1 hour.
An error will be thrown if the endDateTime is provided without the startDateTime or if the endDateTime is earlier than the startDateTime.
Currently chatInfo is only supported in beta.
Response
If successful, this method returns a 201 Created response code if a new meeting is created, or a 200 OK response code if an existing meeting is retrieved. In both cases, an onlineMeeting object is returned in the response body.
Examples
Example 1: Create or get an online meeting with an external ID
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var startDateTime = DateTimeOffset.Parse("2020-02-06T01:49:21.3524945+00:00");
var endDateTime = DateTimeOffset.Parse("2020-02-06T02:19:21.3524945+00:00");
var subject = "Create a meeting with customId provided";
var externalId = "7eb8263f-d0e0-4149-bb1c-1f0476083c56";
var participants = new MeetingParticipants
{
Attendees = new List<MeetingParticipantInfo>()
{
new MeetingParticipantInfo
{
Identity = new IdentitySet
{
User = new Identity
{
Id = "1f35f2e6-9cab-44ad-8d5a-b74c14720000"
}
},
Role = OnlineMeetingRole.Presenter,
Upn = "test1@contoso.com"
}
}
};
await graphClient.Me.OnlineMeetings
.CreateOrGet(externalId,null,endDateTime,participants,startDateTime,subject)
.Request()
.PostAsync();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
startDateTime, err := time.Parse(time.RFC3339, "2020-02-06T01:49:21.3524945+00:00")
requestBody.SetStartDateTime(&startDateTime)
endDateTime, err := time.Parse(time.RFC3339, "2020-02-06T02:19:21.3524945+00:00")
requestBody.SetEndDateTime(&endDateTime)
subject := "Create a meeting with customId provided"
requestBody.SetSubject(&subject)
externalId := "7eb8263f-d0e0-4149-bb1c-1f0476083c56"
requestBody.SetExternalId(&externalId)
participants := msgraphsdk.NewMeetingParticipants()
requestBody.SetParticipants(participants)
participants.SetAttendees( []MeetingParticipantInfo {
msgraphsdk.NewMeetingParticipantInfo(),
SetAdditionalData(map[string]interface{}{
"role": "presenter",
"upn": "test1@contoso.com",
}
}
result, err := graphClient.Me().OnlineMeetings().CreateOrGet().Post(requestBody)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Import-Module Microsoft.Graph.Users.Actions
$params = @{
StartDateTime = [System.DateTime]::Parse("2020-02-06T01:49:21.3524945+00:00")
EndDateTime = [System.DateTime]::Parse("2020-02-06T02:19:21.3524945+00:00")
Subject = "Create a meeting with customId provided"
ExternalId = "7eb8263f-d0e0-4149-bb1c-1f0476083c56"
Participants = @{
Attendees = @(
@{
Identity = @{
User = @{
Id = "1f35f2e6-9cab-44ad-8d5a-b74c14720000"
}
}
Role = "presenter"
Upn = "test1@contoso.com"
}
)
}
}
# A UPN can also be used as -UserId.
Invoke-MgCreateOrGetUserOnlineMeeting -UserId $userId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var chatInfo = new ChatInfo
{
ThreadId = "19:7ebda77322dd4505ac4dedb5b67df076@thread.tacv2"
};
var startDateTime = DateTimeOffset.Parse("2020-02-06T01:49:21.3524945+00:00");
var endDateTime = DateTimeOffset.Parse("2020-02-06T02:19:21.3524945+00:00");
var externalId = "7eb8263f-d0e0-4149-bb1c-1f0476083c56";
var participants = new MeetingParticipants
{
Attendees = new List<MeetingParticipantInfo>()
{
new MeetingParticipantInfo
{
Identity = new IdentitySet
{
User = new Identity
{
Id = "1f35f2e6-9cab-44ad-8d5a-b74c14720000"
}
},
Upn = "test1@contoso.com"
}
}
};
var subject = "Create a meeting with customId provided";
await graphClient.Me.OnlineMeetings
.CreateOrGet(externalId,chatInfo,endDateTime,participants,startDateTime,subject)
.Request()
.PostAsync();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
ChatInfo chatInfo = new ChatInfo();
chatInfo.threadId = "19:7ebda77322dd4505ac4dedb5b67df076@thread.tacv2";
OffsetDateTime startDateTime = OffsetDateTimeSerializer.deserialize("02/06/2020 01:49:21");
OffsetDateTime endDateTime = OffsetDateTimeSerializer.deserialize("02/06/2020 02:19:21");
String externalId = "7eb8263f-d0e0-4149-bb1c-1f0476083c56";
MeetingParticipants participants = new MeetingParticipants();
LinkedList<MeetingParticipantInfo> attendeesList = new LinkedList<MeetingParticipantInfo>();
MeetingParticipantInfo attendees = new MeetingParticipantInfo();
IdentitySet identity = new IdentitySet();
Identity user = new Identity();
user.id = "1f35f2e6-9cab-44ad-8d5a-b74c14720000";
identity.user = user;
attendees.identity = identity;
attendees.upn = "test1@contoso.com";
attendeesList.add(attendees);
participants.attendees = attendeesList;
String subject = "Create a meeting with customId provided";
graphClient.me().onlineMeetings()
.createOrGet(OnlineMeetingCreateOrGetParameterSet
.newBuilder()
.withChatInfo(chatInfo)
.withEndDateTime(endDateTime)
.withExternalId(externalId)
.withParticipants(participants)
.withStartDateTime(startDateTime)
.withSubject(subject)
.build())
.buildRequest()
.post();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
chatInfo := msgraphsdk.NewChatInfo()
requestBody.SetChatInfo(chatInfo)
threadId := "19:7ebda77322dd4505ac4dedb5b67df076@thread.tacv2"
chatInfo.SetThreadId(&threadId)
startDateTime, err := time.Parse(time.RFC3339, "2020-02-06T01:49:21.3524945+00:00")
requestBody.SetStartDateTime(&startDateTime)
endDateTime, err := time.Parse(time.RFC3339, "2020-02-06T02:19:21.3524945+00:00")
requestBody.SetEndDateTime(&endDateTime)
externalId := "7eb8263f-d0e0-4149-bb1c-1f0476083c56"
requestBody.SetExternalId(&externalId)
participants := msgraphsdk.NewMeetingParticipants()
requestBody.SetParticipants(participants)
participants.SetAttendees( []MeetingParticipantInfo {
msgraphsdk.NewMeetingParticipantInfo(),
SetAdditionalData(map[string]interface{}{
"upn": "test1@contoso.com",
}
}
subject := "Create a meeting with customId provided"
requestBody.SetSubject(&subject)
result, err := graphClient.Me().OnlineMeetings().CreateOrGet().Post(requestBody)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Import-Module Microsoft.Graph.Users.Actions
$params = @{
ChatInfo = @{
ThreadId = "19:7ebda77322dd4505ac4dedb5b67df076@thread.tacv2"
}
StartDateTime = [System.DateTime]::Parse("2020-02-06T01:49:21.3524945+00:00")
EndDateTime = [System.DateTime]::Parse("2020-02-06T02:19:21.3524945+00:00")
ExternalId = "7eb8263f-d0e0-4149-bb1c-1f0476083c56"
Participants = @{
Attendees = @(
@{
Identity = @{
User = @{
Id = "1f35f2e6-9cab-44ad-8d5a-b74c14720000"
}
}
Upn = "test1@contoso.com"
}
)
}
Subject = "Create a meeting with customId provided"
}
# A UPN can also be used as -UserId.
Invoke-MgCreateOrGetUserOnlineMeeting -UserId $userId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.