| title | user: translateExchangeIds |
|---|---|
| description | Translate identifiers of Outlook-related resources between formats. |
| author | SuryaLashmiS |
| ms.localizationpriority | medium |
| ms.subservice | outlook |
| doc_type | apiPageType |
| ms.date | 04/04/2024 |
Namespace: microsoft.graph
Translate identifiers of Outlook-related resources between formats.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
POST /me/translateExchangeIds
POST /users/{id|userPrincipalName}/translateExchangeIds| Name | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Parameter | Type | Description |
|---|---|---|
| inputIds | String collection | A collection of identifiers to convert. All identifiers in the collection MUST have the same source ID type, and MUST be for items in the same mailbox. Maximum size of this collection is 1000 strings. |
| sourceIdType | exchangeIdFormat | The ID type of the identifiers in the InputIds parameter. |
| targetIdType | exchangeIdFormat | The requested ID type to convert to. |
| Member | Description |
|---|---|
| entryId | The binary entry ID format used by MAPI clients. |
| ewsId | The ID format used by Exchange Web Services clients. |
| immutableEntryId | The binary MAPI-compatible immutable ID format. |
| restId | The default ID format used by Microsoft Graph. |
| restImmutableEntryId | The immutable ID format used by Microsoft Graph. |
The binary formats (entryId and immutableEntryId) are URL-safe base64 encoded. URL-safeness is implemented by modifying the base64 encoding of the binary data in the following way:
- Replace
+with- - Replace
/with_ - Remove any trailing padding characters (
=) - Add an integer to the end of the string indicating how many padding characters were in the original (
0,1, or2)
If successful, this method returns 200 OK response code and a convertIdResult collection in the response body.
The following example shows how to convert multiple identifiers from the normal REST API format (restId) to the REST immutable format (restImmutableEntryId).
Here is the example request.
POST https://graph.microsoft.com/v1.0/me/translateExchangeIds
Content-Type: application/json
{
"inputIds" : [
"{rest-formatted-id-1}",
"{rest-formatted-id-2}"
],
"sourceIdType": "restId",
"targetIdType": "restImmutableEntryId"
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
Here is the example response
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"sourceId": "{rest-formatted-id-1}",
"targetId": "{rest-immutable-formatted-id-1}"
},
{
"sourceId": "{rest-formatted-id-2}",
"targetId": "{rest-immutable-formatted-id-2}"
}
]
}