Mailbox Folders Restore

The /RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders resource collection represents organization mailbox folders to explore and restore data and allows you to manage data in backed-up mailbox folders.

Get Mailbox Folders

Returns a collection of organization mailbox folders to explore and restore mailbox folders data.

SecurityBearer
Request
path Parameters
restoreSessionId
required
string <uuid>

Specifies the identification number of the restore session. For more information on how to get this parameter, see Get Restore Sessions.

mailboxId
required
string <uuid>

Specifies the identification number of the mailbox. For more information on how to get this parameter, see Get Mailboxes.

query Parameters
offset
integer <int32>

Excludes from a response page the first N items of a collection resource. The default value is 0.

limit
integer <int32>

Limits the maximum number of items that the server will return on a page. The maximum supported number of items per page is 10,000. The default value is 30.

parentId
string

Specifies what information the server will return in the resource representation. The following values are available:

  • <parentID> - ID of the mailbox folder. In the response, the server will return a representation of subfolders for the specified mailbox folder.
  • root - specifies that the server will return a representation of all root folders of the mailbox without their subfolders.
If you do not specify this parameter, the server will return a representation of all parent folders of the mailbox and their subfolders. Thus, the server will require longer time to execute the request.

name
string

Specifies the name of the organization mailbox folder. To filter objects, you can use * and ? wildcard characters.

Responses
200

OK

default

Operation failure response.

get/v8/RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",
  • "results": [
    ],
  • "_links": {
    }
}

Get Mailbox Folder

Returns a resource representation of an organization mailbox folder with the specified ID.

SecurityBearer
Request
path Parameters
restoreSessionId
required
string <uuid>

Specifies the identification number of the restore session. For more information on how to get this parameter, see Get Restore Sessions.

mailboxId
required
string <uuid>

Specifies the identification number of the mailbox. For more information on how to get this parameter, see Get Mailboxes.

folderId
required
string

Specifies the identification number of the folder. For more information on how to get this parameter, see Get Mailbox Folders.

Responses
200

OK

default

Operation failure response.

get/v8/RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders/{folderId}
Request samples
Response samples
application/json
{
  • "name": "string",
  • "type": "Journal",
  • "category": "Inbox",
  • "description": "string",
  • "mailboxId": "f16f762c-c61b-441d-8b9c-9aff4650cbe1",
  • "_links": {
    },
  • "_actions": {
    },
  • "id": "string"
}

Restore Data from Folders to Original Mailbox

Restores backed-up data from an organization mailbox folder with the specified ID to the original mailbox.

x-codegen-request-body-name: restoreParameters
SecurityBearer
Request
path Parameters
restoreSessionId
required
string <uuid>

Specifies the identification number of the restore session. For more information on how to get this parameter, see Get Restore Sessions.

mailboxId
required
string <uuid>

Specifies the identification number of the mailbox. For more information on how to get this parameter, see Get Mailboxes.

folderId
required
string

Specifies the identification number of the folder. For more information on how to get this parameter, see Get Mailbox Folders.

Request Body schema: application/json
required
userName
string

Specifies the user name that you want to use for authenticating to the Exchange organization.

userPassword
string <password> (SecureString)

Specifies a password.

userCode
string

Specifies the authentication code. For more information on how to get a device code, see Get Device Code. This property is required if you want to use a device code for data restore.

applicationId
string or null <uuid>

Specifies the ID of the Microsoft Entra application that you want to use for restore.

applicationCertificatePassword
string <password> (SecureString)

Specifies a password.

applicationCertificate
string

Specifies the SSL certificate configured for the Microsoft Entra application that you want to use for data restore. You must provide the certificate as a Base64 string.

impersonationAccountName
string

Specifies a user name of the account that will be used as a Microsoft Exchange account to restore data.

Note: This property is required if you want to use an application certificate for data restore. Use this property only with the applicationCertificate property.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders/{folderId}/restore
Request samples
application/json
{
  • "userName": "string",
  • "userPassword": "pa$$word",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificatePassword": "pa$$word",
  • "applicationCertificate": "string",
  • "impersonationAccountName": "string"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Restore Data from Folders to Another Mailbox

Restores backed-up data from an organization mailbox folder with the specified ID to another mailbox.

x-codegen-request-body-name: restoreParameters
SecurityBearer
Request
path Parameters
restoreSessionId
required
string <uuid>

Specifies the identification number of the restore session. For more information on how to get this parameter, see Get Restore Sessions.

mailboxId
required
string <uuid>

Specifies the identification number of the mailbox. For more information on how to get this parameter, see Get Mailboxes.

folderId
required
string

Specifies the identification number of the folder. For more information on how to get this parameter, see Get Mailbox Folders.

Request Body schema: application/json
required
changedItems
boolean or null

Defines whether all versions of mailbox items will be restored.

deletedItems
boolean or null

Defines whether the deleted mailbox items will be restored.

markRestoredAsUnread
boolean or null

Defines whether the restored mailbox data will be marked as unread.

excludeDrafts
boolean or null

Defines whether the Drafts mailbox folder will not be restored.

excludeDeletedItems
boolean or null

Defines whether the Deleted Items mailbox folder will not be restored.

excludeInPlaceHoldItems
boolean or null

Defines whether the preserved items placed on In-Place Hold will not be restored.

excludeLitigationHoldItems
boolean or null

Defines whether the preserved items placed on Litigation Hold will not be restored.

mailbox
string

Specifies the email address of the mailbox to which you want to restore data.

casServer
string

Specifies the Microsoft Exchange server with Client Access Server (CAS) role. Data will be restored to a specified mailbox server.

folder
string

Specifies the mailbox folder to which you want to restore data.

officeRegion
string or null

Specifies the region of the target Exchange organization.

Enum: "Worldwide" "Germany" "China" "USDefence" "USGovernment"
officeOrganizationName
string

Specifies the name of the target Exchange organization.

userName
string

Specifies the user name that you want to use for authenticating to the Exchange organization.

userPassword
string <password> (SecureString)

Specifies a password.

userCode
string

Specifies the authentication code. For more information on how to get a device code, see Get Device Code. This property is required if you want to use a device code for data restore.

applicationId
string or null <uuid>

Specifies the ID of the Microsoft Entra application that you want to use for restore.

applicationCertificatePassword
string <password> (SecureString)

Specifies a password.

applicationCertificate
string

Specifies the SSL certificate configured for the Microsoft Entra application that you want to use for data restore. You must provide the certificate as a Base64 string.

impersonationAccountName
string

Specifies a user name of the account that will be used as a Microsoft Exchange account to restore data.

Note: This property is required if you want to use an application certificate for data restore. Use this property only with the applicationCertificate property.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders/{folderId}/restoreTo
Request samples
application/json
{
  • "changedItems": true,
  • "deletedItems": true,
  • "markRestoredAsUnread": true,
  • "excludeDrafts": true,
  • "excludeDeletedItems": true,
  • "excludeInPlaceHoldItems": true,
  • "excludeLitigationHoldItems": true,
  • "mailbox": "string",
  • "casServer": "string",
  • "folder": "string",
  • "officeRegion": "Worldwide",
  • "officeOrganizationName": "string",
  • "userName": "string",
  • "userPassword": "pa$$word",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificatePassword": "pa$$word",
  • "applicationCertificate": "string",
  • "impersonationAccountName": "string"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Export Data from Folders

Exports backed-up data from an organization mailbox folder with the specified ID to a PST file.

IMPORTANT
To export data to PST (Personal Storage Table) files, you must have a 64-bit version of Microsoft Outlook 2016, Microsoft Outlook 2013 or Microsoft Outlook 2010 installed on a computer running restore sessions.
The request command will look for a specified keyword in item names and fields inside the organization mailbox folder. The backed-up data with a specified keyword then will be exported to a PST file and placed in a temporary folder on the Veeam Backup for Microsoft 365 server. After that, the PST file will be transferred as application/octet-stream media to the client. To download, read, convert to PST or perform other actions with the octet-stream, use features of programming languages.

If the size of the exported data exceeds the limit specified for the PST file, Veeam Backup for Microsoft 365 splits the PST file into separate files and exports these files to an archive file of the ZIP format. For example, you specified 1 GB as the PST file size limit. The size of the exported data is 1.5 GB. In this case, Veeam Backup for Microsoft 365 will export data to a ZIP archive. The archive will contain two PST files: one PST file of the 1 GB size and another PST file of the 0.5 GB size.

If downloading of the octet-stream was interrupted for some reason, you can send the request again and download the file from the temporary folder.

x-codegen-request-body-name: exportOptions
SecurityBearer
Request
path Parameters
restoreSessionId
required
string <uuid>

Specifies the identification number of the restore session. For more information on how to get this parameter, see Get Restore Sessions.

mailboxId
required
string <uuid>

Specifies the identification number of the mailbox. For more information on how to get this parameter, see Get Mailboxes.

folderId
required
string

Specifies the identification number of the folder. For more information on how to get this parameter, see Get Mailbox Folders.

Request Body schema: application/json
required
contentKeyword
string

Specifies a keyword to query backed-up data.

enablePstSizeLimit
boolean or null

Defines whether to set the size limit for the exported PST file. If set to true, indicates that you must specify the pstSizeLimitBytes property.

pstSizeLimitBytes
integer or null <int64>

Specifies the limit of the exported PST file in Bytes. You can specify the limit range from 1 GB to 49 GB.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders/{folderId}/exportToPst
Request samples
application/json
{
  • "contentKeyword": "string",
  • "enablePstSizeLimit": true,
  • "pstSizeLimitBytes": 0
}
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Search for Exchange Items in Mailbox Folder

Searches for items in an organization mailbox folder with the specified ID.

x-codegen-request-body-name: searchOptions
SecurityBearer
Request
path Parameters
restoreSessionId
required
string <uuid>

Specifies the identification number of the restore session. For more information on how to get this parameter, see Get Restore Sessions.

mailboxId
required
string <uuid>

Specifies the identification number of the mailbox. For more information on how to get this parameter, see Get Mailboxes.

folderId
required
string

Specifies the identification number of the folder. For more information on how to get this parameter, see Get Mailbox Folders.

query Parameters
offset
integer <int32>

Excludes from a response page the first N items of a collection resource. The default value is 0.

limit
integer <int32>

Limits the maximum number of items that the server will return on a page. The maximum supported number of items per page is 10,000. The default value is 30.

setId
string <uuid>

Specifies ID of a request sent earlier and stored in cache. Using the ID, you decrease the number of requests to the cloud.

Request Body schema: application/json
required
query
string

Specifies query parameters used to search for items. For the complete list of supported query parameters, see the Appendix A. Item Search Parameters section of the Veeam Backup for Microsoft 365 User Guide.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/mailboxes/{mailboxId}/folders/{folderId}/search
Request samples
application/json
{
  • "query": "string"
}
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",
  • "results": [
    ],
  • "_links": {
    }
}

Document updated 12/18/2025

Page content applies to build 8.3.0.2201