Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
Namespace: microsoft.graph
Export Exchange mailboxItem objects in full fidelity. This API exports each item as an opaque stream. The data stream isn't intended for parsing, but can be used to import an item back into an Exchange mailbox. For more information, see Overview of the mailbox import and export APIs in Microsoft Graph.
You can export up to 20 items in a single export request.
This API is available in the following national cloud deployments.
| Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
|---|---|---|---|
| ✅ | ❌ | ❌ | ❌ |
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.Export | MailboxItem.ImportExport |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | MailboxItem.Export.All | MailboxItem.ImportExport.All |
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. The 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/v1.0/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/v1.0/$metadata#Collection(microsoft.graph.exportItemResponse)",
"value": [
{
"itemId": "EDSVrdi3lRAADmpnf1AAA=",
"changeKey": "CQAAABYAAACQ2fKdhq8oSKEDSVrdi3lRAAEu4C+G",
"data": "VGhpcyBpcyBhIHRlc3QgZGF0YSB0aGF0IHdpbGwgYmUgY29udmVydGVkIHRvIGEgQmFzZTY0IHN0cmVhbQ=="
},
{
"itemId": "EDSVrdi3lRAAD45b7RAAA=",
"changeKey": "CQAAABYAAACQ2fKdhq8oSKEDSVrdi3lRAAD4pUax",
"data": "VGhpcyBpcyBhIHRlc3QgZGF0YSB0aGF0IHdpbGwgYmUgY29udmVydGVkIHRvIGEgQmFzZTY0IHN0cmVhbQ=="
}
]
}