Delete data extension

Delete a data extension (openTypeExtension object) from the specified instance of a resource.

Prerequisites

One of the following permissions is required to execute this API, depending on the resource you're deleting the extension from:

Supported resource Permission Supported resource Permission
event Calendars.ReadWrite group event Calendars.ReadWrite
group post Group.ReadWrite.All message Mail.ReadWrite
personal contact Contacts.ReadWrite    

HTTP request

In the request, identify the resource instance, use the extensions navigation property of that instance to identify the extension, and do a DELETE on that extension instance.

DELETE /users/{id|userPrincipalName}/contacts/{id}/extensions/{extensionId}
DELETE /users/{id|userPrincipalName}/events/{id}/extensions/{extensionId}
DELETE /users/{id|userPrincipalName}/messages/{id}/extensions/{extensionId}
DELETE /groups/{id}/events/{id}/extensions/{extensionId}
DELETE /groups/{id}/threads/{id}/posts/{id}/extensions/{extensionId}

Note: Some resources support identifying an instance in multiple ways all of which support deleting an extension. The above section includes only a subset of the supported syntax. You can find a more complete description of the ways to identify an existing instance in the corresponding GET topic below.

For example, you can identify an existing message in the signed-in user's mailbox as follows:

/me/messages/{id}

To delete an extension in an existing message instance in that mailbox, build upon that URL, identify an extension using the extensions navigation property of that message, and do a DELETE on that extension as shown below:

DELETE /me/messages/{id}/extensions/{extensionId}

Parameters

Parameter Type Description
URL parameters    
id string A unique identifier for an instance in the corresponding collection. Required.
extensionId string This can be an extension name which is a unique text identifier for the extension, or a fully qualified name which concatenates the extension type and unique text identifier. The fully qualified name is returned in the id property when you create the extension. Required.

Request headers

Name Value
Authorization Bearer %token%

Request body

Do not supply a request body for this method.

Response

If successful, this method returns 204, No Content response code. It does not return anything in the response body.

Example

Request

The first example references an extension by its name and deletes the extension in the specified message.

DELETE https://graph.microsoft.com/beta/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')

The second example deletes an extension in the specified group event.

DELETE https://graph.microsoft.com/beta/groups('f5480dfd-7d77-4d0b-ba2e-3391953cc74a')/events('AAMkADVlN17IsAAA=')/extensions('Com.Contoso.Referral')
Response

Here is an example of the response.

HTTP/1.1 204 No Content