OneDrives Restore

The /RestoreSessions/{restoreSessionId}/Organization/OneDrives resource collection represents organization OneDrives to explore and restore data and allows you to manage data in backed-up OneDrives.

Get OneDrives

Returns a collection of OneDrives to explore and restore OneDrive 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.

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.

Responses
200

OK

default

Operation failure response.

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

Get OneDrive

Returns a resource representation of OneDrive with the specified ID to explore and restore 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.

oneDriveId
required
string

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

Responses
200

OK

default

Operation failure response.

get/v8/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "url": "string",
  • "_links": {
    }
}

Copy OneDrive Data

Copies backed-up data of the specified OneDrive to another location.

x-codegen-request-body-name: copyToConfig
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.

oneDriveId
required
string

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

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

Defines whether all versions of OneDrive items will be copied.

deletedItems
boolean or null

Defines whether the deleted OneDrive items will be copied.

restorePermissions
boolean

Defines whether the OneDrive items will be copied with all permissions.

sendSharedLinksNotification
boolean or null

Defines whether the shared links notifications will be sent.

object (RESTOneDrive)
folder
string

Specifies the target folder for the copied OneDrive data.

documentVersion
string or null

Specifies what version of the OneDrive documents will be copied.

Enum: "All" "Last"
documentLastVersionAction
string or null

Specifies the action that will be performed with the last version of the copied OneDrive document on the production server.

Enum: "Overwrite" "Merge"
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.

userName
string

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

userPassword
string <password> (SecureString)

Specifies a password.

officeRegion
string or null

Specifies the region of the target Microsoft 365 organization.

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

Specifies the name of the target Microsoft 365 organization.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/copyTo
Request samples
application/json
{
  • "changedItems": true,
  • "deletedItems": true,
  • "restorePermissions": true,
  • "sendSharedLinksNotification": true,
  • "onedrive": {
    },
  • "folder": "string",
  • "documentVersion": "All",
  • "documentLastVersionAction": "Overwrite",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificatePassword": "pa$$word",
  • "applicationCertificate": "string",
  • "userName": "string",
  • "userPassword": "pa$$word",
  • "officeRegion": "Worldwide",
  • "organizationName": "string"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Save OneDrive Data

Saves backed-up data of OneDrive with the specified ID.

OneDrive items are always saved in a ZIP archive. When you save OneDrive data, the request command compresses the data and places the ZIP archive in a temporary folder on the Veeam Backup for Microsoft 365 server. After that, the archive is transferred as application/octet-stream media to the client. To download, read or perform other actions with the octet-stream, use features of programming languages.

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.

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.

oneDriveId
required
string

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

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/save
Request samples
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Send OneDrive Data

Sends backed-up data of OneDrive with the specified ID as attachments in an email message.

NOTE
To send items as attachments, you must specify the Veeam Explorer for Microsoft OneDrive for Business email settings. For more information, see Edit Email Settings.

x-codegen-request-body-name: jsonOptions
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.

oneDriveId
required
string

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

Request Body schema: application/json
required
skipItemChecks
boolean

Defines whether Veeam Backup for Microsoft 365 does not check items and skips those items that cannot be sent.

from
string

Specifies the email address from which the attachments will be sent.

to
string

Specifies the email address to which the attachments will be sent.

subject
string

Specifies the subject of the email message used for sending the attachments.

text
string

Specifies the body of the email message used for sending the attachments.

Responses
204

No Content

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/send
Request samples
application/json
{
  • "skipItemChecks": true,
  • "from": "string",
  • "to": "string",
  • "subject": "string",
  • "text": "string"
}
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Restore OneDrive Data

Restores backed-up data of OneDrive with the specified ID to its original location.

x-codegen-request-body-name: restoreConfig
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.

oneDriveId
required
string

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

Request Body schema: application/json
required
documentAction
string or null

Specifies the action that will be performed in case the restore destination contains the restored documents.

Enum: "Overwrite" "Keep"
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.

userName
string

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

userPassword
string <password> (SecureString)

Specifies a password.

officeRegion
string or null

Specifies the region of the target Microsoft 365 organization.

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

Specifies the name of the target Microsoft 365 organization.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/Organization/OneDrives/{oneDriveId}/restore
Request samples
application/json
{
  • "documentAction": "Overwrite",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificatePassword": "pa$$word",
  • "applicationCertificate": "string",
  • "userName": "string",
  • "userPassword": "pa$$word",
  • "officeRegion": "Worldwide",
  • "organizationName": "string"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Bulk Restore of OneDrives

Performs a bulk restore of backed-up OneDrives.

x-codegen-request-body-name: config
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.

Request Body schema: application/json
required
documentAction
string or null

Specifies the action that will be performed in case the restore destination contains the restored documents.

Enum: "Overwrite" "Keep"
skipUnresolved
boolean or null

Defines whether the unresolved items will be skipped.

Array of objects (RESTOneDrive)

Specifies OneDrives that you want to restore.

officeUsername
string

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

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.

officeUserpassword
string <password> (SecureString)

Specifies a password.

onpremisesUsername
string

Specifies the user name that you want to use for authenticating to the on-premises organization.

onpremisesUserpassword
string <password> (SecureString)

Specifies a password.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/Organization/OneDrives/restore
Request samples
application/json
{
  • "documentAction": "Overwrite",
  • "skipUnresolved": true,
  • "oneDrives": [
    ],
  • "officeUsername": "string",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificatePassword": "pa$$word",
  • "applicationCertificate": "string",
  • "officeUserpassword": "pa$$word",
  • "onpremisesUsername": "string",
  • "onpremisesUserpassword": "pa$$word"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Search for OneDrive Items in OneDrives

Searches for OneDrive items in backed-up organization OneDrives.

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.

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.

itemType
string

Specifies the type of the restore item.

Enum: "All" "Folders" "Documents"
x-ms-enum: {"name":"RESTOneDriveSearchItemType"}
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/OneDrives/search
Request samples
application/json
{
  • "query": "string"
}
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",
  • "results": [
    ],
  • "_links": {
    }
}

Search for OneDrive Items in OneDrive

Searches for OneDrive items in backed-up OneDrive 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.

oneDriveId
required
string

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

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.

itemType
string

Specifies the type of the restore item.

Enum: "All" "Folders" "Documents"
x-ms-enum: {"name":"RESTOneDriveSearchItemType"}
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/OneDrives/{oneDriveId}/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