mailbox: exportItems

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.

Export Exchange mailboxItem objects in full-fidelity FastTransfer stream format for backup purposes. This item format can be restored to the same mailbox or a different one.

You can export up to 20 items in a single export request.

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) MailboxItem.ImportExport Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application MailboxItem.ImportExport.All Not available.

HTTP request

POST /admin/exchange/mailboxes/{mailboxId}/exportItems

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 parameters.

The following table lists the parameters that are required when you call this action.

Parameter Type Description
itemIds String collection A collection of identifiers of mailboxItem objects to export. All identifiers in the collection must be for items in the same mailbox. Maximum size of this collection is 20 strings.

Response

If successful, this action returns a 200 OK response code and a collection of exportItemResponse objects in the response body.

Examples

Request

The following example exports two items present in the user's mailbox. The itemIds of the items to be exported are specified in the request body.

POST https://graph.microsoft.com/beta/admin/exchange/mailboxes/MBX:e0643f21@a7809c93/exportItems
Content-type: application/json

{
    "itemIds": [
        "EDSVrdi3lRAADmpnf1AAA=",
        "EDSVrdi3lRAAD45b7RAAA="
    ]
}

Response

The following example shows the response.

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

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 232

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.exportItemResponse)",
    "value": [
        {
            "itemId": "EDSVrdi3lRAADmpnf1AAA=",
            "changeKey": "CQAAABYAAACQ2fKdhq8oSKEDSVrdi3lRAAEu4C+G"
        },
        {
            "itemId": "EDSVrdi3lRAAD45b7RAAA=",
            "changeKey": "CQAAABYAAACQ2fKdhq8oSKEDSVrdi3lRAAD4pUax"
        }
    ]
}