Create virtualEventTownhall

Namespace: microsoft.graph

Important

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 a new virtualEventTownhall object in draft mode.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Least privileged permission Higher privileged permissions
Delegated (work or school account) VirtualEvent.ReadWrite Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Not supported. Not supported.

HTTP request

POST /solutions/virtualEvents/townhalls

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the supported derived types of virtualEventTownhall object.

You can specify the following properties when you create a virtualEventTownhall.

Property Type Description
audience meetingAudience The audience to whom the town hall is visible.
coOrganizers communicationsUserIdentity collection The identity information of coorganizers of the town hall.
description itemBody A description of the town hall.
displayName String Display name of the town hall.
endDateTime dateTimeTimeZone The date and time when the town hall ends.
invitedAttendees identity collection The identities of the attendees invited to the town hall. The supported identities are: communicationsGuestIdentity and communicationsUserIdentity.
isInviteOnly Boolean Indicates whether the town hall is only open to invited people and groups within your organization. The isInviteOnly property can only be true if the value of the audience property is set to organization.
startDateTime dateTimeTimeZone The date and time when the town hall starts.

Response

If successful, this method returns a 201 Created response code and a virtualEventTownhall object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/solutions/virtualEvents/townhalls
Content-Type: application/json

{     
    "displayName": "The Impact of Tech on Our Lives",
    "description": "Discusses how technology has changed the way we communicate.",
    "startDateTime": {
      "dateTime": "2023-03-30T10:00:00", 
      "timeZone": "Pacific Standard Time" 
    },
    "endDateTime": {
      "dateTime": "2023-03-30T17:00:00", 
      "timeZone": "Pacific Standard Time" 
    },
    "audience": "organization",
    "coOrganizers": [
      { 
        "id": "7b7e1acd-a3e0-4533-8c1d-c1a4ca0b2e2b", 
        "tenantId": "77229959-e479-4a73-b6e0-ddac27be315c" 
      }
    ]
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{ 
    "id": "bce9a3ca-a310-48fa-baf3-1cedcd04bb3f@4aa05bcc-1cac-4a83-a9ae-0db84b88f4ba",
    "status": "draft",
    "displayName": "The Impact of Tech on Our Lives",
    "description": "Discusses how technology has changed the way we communicate.",
    "startDateTime": {
      "dateTime": "2023-03-30T10:00:00", 
      "timeZone": "Pacific Standard Time" 
    },
    "endDateTime": {
      "dateTime": "2023-03-30T17:00:00", 
      "timeZone": "Pacific Standard Time" 
    },
    "audience": "organization",
    "createdBy": {
      "application": null,
      "device": null,
      "user": {
        "id": "b7ef013a-c73c-4ec7-8ccb-e56290f45f68",
        "displayName": "Diane Demoss",
        "tenantId": "77229959-e479-4a73-b6e0-ddac27be315c"
      }
    },
    "coOrganizers": [
      { 
        "id": "7b7e1acd-a3e0-4533-8c1d-c1a4ca0b2e2b", 
        "displayName": "Kenneth Brown", 
        "tenantId": "77229959-e479-4a73-b6e0-ddac27be315c" 
      }
    ],
    "invitedAttendees": [],
    "isInviteOnly": false
}