Teams Files Restore

The /RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/files resource collection represents Microsoft Teams files to explore and restore and allows you to manage backed-up Microsoft Teams files.

Get Files

Returns a collection of backed-up files of a Microsoft Teams team with the specified ID to explore and restore.

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.

teamId
required
string <uuid>

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

query Parameters
channelId
string

Specifies the identification number of the channel whose files the server will return in the resource representation. For more information on how to get this parameter, see Get Channels.

If you do not specify this parameter, the server will return a representation of files pertaining to all channels of the backed-up team.

parentId
string

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

  • <parentID> - ID of a parent folder. In the response, the server will return a representation of files in the specified folder.
  • root - specifies that the server will return a representation of all root folders of team channels.
If you do not specify this parameter, the server will return a representation of all files in all folders. Thus, the server will require longer time to execute the request.

foldersOnly
boolean

Defines whether the server will return only folders.

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/teams/{teamId}/files
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",
  • "results": [
    ],
  • "_links": {
    }
}

Get File

Returns a resource representation of a backed-up Microsoft Teams file 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.

teamId
required
string <uuid>

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

channelId
required
string

Specifies the identification number of the channel whose file the server will return in the resource representation. For more information on how to get this parameter, see Get Channels.

fileId
required
string <uuid>

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

Responses
200

OK

default

Operation failure response.

get/v8/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/channels/{channelId}/files/{fileId}
Request samples
Response samples
application/json
{
  • "id": "00000000-0000-0000-0000-000000000000",
  • "name": "string",
  • "sizeBytes": 0,
  • "version": 0,
  • "uiVersion": "string",
  • "modified": "2019-08-24T14:15:22Z",
  • "modifiedBy": "string",
  • "channelId": "string",
  • "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec",
  • "fileType": "File",
  • "_links": {
    }
}

Get Previous Versions of File

Returns a collection of versions of a backed-up Microsoft Teams file 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.

teamId
required
string <uuid>

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

channelId
required
string

Specifies the identification number of the channel whose file the server will return in the resource representation. For more information on how to get this parameter, see Get Channels.

fileId
required
string <uuid>

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

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/teams/{teamId}/channels/{channelId}/files/{fileId}/versions
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",
  • "results": [
    ],
  • "_links": {
    }
}

Save Files

Saves backed-up Microsoft Teams files.

When you save files, the request command archives the files 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.

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

teamId
required
string <uuid>

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

Request Body schema: application/json
required
channelId
string

Specifies the ID of the channel whose files you want to save. Veeam Explorer for Microsoft Teams will save all files of this channel. For more information on how to get this parameter, see Get Team Channels.

Note: You do not need to use this property if you use the files property to specify what files to save.

Array of objects (RESTTeamsFile)

Specifies IDs of the files that you want to save. The files must reside in the same channel. For more information on how to get such IDs, see Get Files.

Note: You do not need to use this property if you use the channelId property to specify a channel whose files to save.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/files/save
Request samples
application/json
{
  • "channelId": "string",
  • "files": [
    ]
}
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Save File

Saves a backed-up Microsoft Teams file with the specified ID.

When you save a file, the request command places the file in a temporary folder on the Veeam Backup for Microsoft 365 server. After that, the file 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.

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

teamId
required
string <uuid>

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

channelId
required
string

Specifies the identification number of the channel whose file the server will save. For more information on how to get this parameter, see Get Channels.

fileId
required
string <uuid>

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

Request Body schema: application/json
required
asZip
boolean

Defines whether the Microsoft Teams file will be saved in a ZIP archive.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/channels/{channelId}/files/{fileId}/save
Request samples
application/json
{
  • "asZip": true
}
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Send Files

Sends backed-up Microsoft Teams files as attachments in an email message.

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

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

teamId
required
string <uuid>

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

Request Body schema: application/json
required
channelId
string

Specifies the ID of the channel whose files you want to send. Veeam Explorer for Microsoft Teams will send all files of this channel. For more information on how to get this parameter, see Get Team Channels.

Note: You do not need to use this property if you use the files property to specify what files to send.

Array of objects (RESTTeamsFile)

Specifies IDs of the files that you want to send. The files must reside in the same channel. For more information on how to get such IDs, see Get Files.

Note: You do not need to use this property if you use the channelId property to specify a channel whose files to send.

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/teams/{teamId}/files/send
Request samples
application/json
{
  • "channelId": "string",
  • "files": [
    ],
  • "from": "string",
  • "to": "string",
  • "subject": "string",
  • "text": "string"
}
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Send File

Sends a backed-up Microsoft Teams file with the specified ID as an attachment in an email message.

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

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

teamId
required
string <uuid>

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

channelId
required
string

Specifies the identification number of the channel whose file the server will send. For more information on how to get this parameter, see Get Channels.

fileId
required
string <uuid>

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

Request Body schema: application/json
required
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/teams/{teamId}/channels/{channelId}/files/{fileId}/send
Request samples
application/json
{
  • "from": "string",
  • "to": "string",
  • "subject": "string",
  • "text": "string"
}
Response samples
application/json
{
  • "message": "string",
  • "errorCode": "ProxyOffline",
  • "stackTrace": "string"
}

Restore Files

Restores backed-up Microsoft Teams files.

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

teamId
required
string <uuid>

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

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

Specifies what version of files will be restored.

Enum: "All" "Last"
restoreChangedItems
required
boolean or null

Defines whether to restore files that have been modified in the original location since the time when the backup was created.

restoreMissingItems
required
boolean or null

Defines whether to restore files that are missed in the original location.

channelId
string

Specifies the ID of the channel whose files you want to restore. Veeam Explorer for Microsoft Teams will restore all files of this channel. For more information on how to get this parameter, see Get Team Channels.

Note: You do not need to use this property if you use the files property to specify what files to restore.

Array of objects (RESTTeamsFile)

Specifies IDs of the files that you want to restore. The files must reside in the same channel. For more information on how to get such IDs, see Get Files.

Note: You do not need to use this property if you use the channelId property to specify a channel whose files to restore.

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.

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.

applicationCertificatePassword
string <password> (SecureString)

Specifies a password.

userName
string

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

userPassword
string <password> (SecureString)

Specifies a password.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/files/restore
Request samples
application/json
{
  • "channelId": "string",
  • "files": [
    ],
  • "restoreChangedItems": true,
  • "restoreMissingItems": true,
  • "fileVersion": "All",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificate": "string",
  • "applicationCertificatePassword": "pa$$word",
  • "userName": "string",
  • "userPassword": "pa$$word"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Restore Files by Restore Operator

Restores backed-up Microsoft Teams files using Restore Portal. For more information about Restore Portal, see the Data Restore Using Restore Portal section of the Veeam Backup for Microsoft 365 User Guide.

NOTE
To restore data using Restore Portal, you must create a restore session for a restore operator. For more information, see Create Restore Session for Restore Operator.

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

teamId
required
string <uuid>

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

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

Specifies what version of files will be restored.

Enum: "All" "Last"
restoreChangedItems
required
boolean or null

Defines whether to restore files that have been modified in the original location since the time when the backup was created.

restoreMissingItems
required
boolean or null

Defines whether to restore files that are missed in the original location.

channelId
string

Specifies the ID of the channel whose files you want to restore using Restore Portal. For more information on how to get this parameter, see Get Team Channels.

Note: You do not need to use this property if you use the files property to specify what files to restore.

Array of objects (RESTTeamsFile)

Specifies IDs of the files that you want to restore. The files must reside in the same channel. For more information on how to get such IDs, see Get Files.

Note: You do not need to use this property if you use the channelId property to specify a channel whose files to restore.

reason
string

Specifies a reason for the restore operation.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/files/operatorRestore
Request samples
application/json
{
  • "channelId": "string",
  • "files": [
    ],
  • "restoreChangedItems": true,
  • "restoreMissingItems": true,
  • "fileVersion": "All",
  • "reason": "string"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Restore File

Restores a backed-up Microsoft Teams file with the specified ID.

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

teamId
required
string <uuid>

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

channelId
required
string

Specifies the identification number of the channel whose file the server will return in the resource representation. For more information on how to get this parameter, see Get Channels.

fileId
required
string <uuid>

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

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

Specifies what version of files will be restored.

Enum: "All" "Last"
restoreChangedItems
required
boolean or null

Defines whether to restore files that have been modified in the original location since the time when the backup was created.

restoreMissingItems
required
boolean or null

Defines whether to restore files that are missed in the original location.

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.

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.

applicationCertificatePassword
string <password> (SecureString)

Specifies a password.

userName
string

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

userPassword
string <password> (SecureString)

Specifies a password.

Responses
200

OK

default

Operation failure response.

post/v8/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/channels/{channelId}/files/{fileId}/restore
Request samples
application/json
{
  • "restoreChangedItems": true,
  • "restoreMissingItems": true,
  • "fileVersion": "All",
  • "userCode": "string",
  • "applicationId": "00000000-0000-0000-0000-000000000000",
  • "applicationCertificate": "string",
  • "applicationCertificatePassword": "pa$$word",
  • "userName": "string",
  • "userPassword": "pa$$word"
}
Response samples
application/json
{
  • "sessionId": "00000000-0000-0000-0000-000000000000"
}

Document updated 12/18/2025

Page content applies to build 8.3.0.2201