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.
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
Request
The following example shows how to 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"
}
},
Upn = "test1@contoso.com"
}
}
};
await graphClient.Me.OnlineMeetings
.CreateOrGet(externalId,null,endDateTime,participants,startDateTime,subject)
.Request()
.PostAsync();
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new CreateOrGetPostRequestBody();
$requestBody->setStartDateTime(new DateTime('2020-02-06T01:49:21.3524945+00:00'));
$requestBody->setEndDateTime(new DateTime('2020-02-06T02:19:21.3524945+00:00'));
$requestBody->setSubject('Create a meeting with customId provided');
$requestBody->setExternalId('7eb8263f-d0e0-4149-bb1c-1f0476083c56');
$participants = new MeetingParticipants();
$attendeesMeetingParticipantInfo1 = new MeetingParticipantInfo();
$attendeesMeetingParticipantInfo1Identity = new IdentitySet();
$attendeesMeetingParticipantInfo1IdentityUser = new Identity();
$attendeesMeetingParticipantInfo1IdentityUser->setId('1f35f2e6-9cab-44ad-8d5a-b74c14720000');
$attendeesMeetingParticipantInfo1Identity->setUser($attendeesMeetingParticipantInfo1IdentityUser);
$attendeesMeetingParticipantInfo1->setIdentity($attendeesMeetingParticipantInfo1Identity);
$attendeesMeetingParticipantInfo1->setUpn('test1@contoso.com');
$attendeesArray []= $attendeesMeetingParticipantInfo1;
$participants->setAttendees($attendeesArray);
$requestBody->setParticipants($participants);
$requestResult = $graphServiceClient->me()->onlineMeetings()->createOrGet()->post($requestBody);