message: unsubscribe


APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

Submits a email request on behalf of the signed-in user to unsubscribe from an email distribution list. Uses the information in the List-Unsubscribe header.

Message senders can use mailing lists in a user-friendly way by including an option for recipients to opt out. They can do so by specifying the List-Unsubscribe header in each message following RFC-2369.

Note In particular, for the unsubscribe action to work, the sender must specify mailto: and not URL-based unsubscribe information.

Setting that header would also set the unsubscribeEnabled property of the message instance to true, and the unsubscribeData property to the header data.

If the unsubscribeEnabled property of a message is true, you can use the unsubscribe action to unsubscribe the user from similar future messages as managed by the message sender.

A successful unsubscribe action moves the message to the Deleted Items folder. The actual exclusion of the user from future mail distribution is managed by the sender.


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) Mail.Send
Delegated (personal Microsoft account) Mail.Send
Application Mail.Send

HTTP request

POST /users/{id | userPrincipalName}/messages/{id}/unsubscribe

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

Do not supply a request body for this method.


If successful, this method returns 202 Accepted response code. It does not return anything in the response body.


Here is an example of how to call this API.


Here is an example of the request.


Here is an example of the response.

HTTP/1.1 202 Accepted