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.
The following table specifies the properties that can be updated.
The following example shows a request.
PATCH https://graph.microsoft.com/v1.0/solutions/backupRestore/exchangeRestoreSessions/2b814d8c-71fd-4d00-a01a-31850bc5b32c
Content-Type: application/json
{
"mailboxRestoreArtifacts@delta": [
{
"restorePoint": { "@odata.id": "1b014d8c-71fe-4d00-a01a-31850bc5b32c" }, //Create a new mailbox restore artifact and add it under the Restore Session.
"destinationType": "inPlace"
},
{
"restorePoint": { "@odata.id": "2b014d8c-71fe-4d00-a01a-31850bc5b32" },
"destinationType": "inPlace"
},
{
"restorePoint": { "@odata.id": "3b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "inPlace"
},
{
"restorePoint": { "@odata.id": "4b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "inPlace"
},
{
"@removed": {
"reason": "changed"
},
"id": "99954f18-c8ec-4b62-85bf-cdf3b70b140e"
},
{
"@removed": {
"reason": "changed"
},
"id": "4267e382-71a9-4c07-bef7-bda97e09c0d2"
},
{
"@removed": {
"reason": "changed"
},
"id": "3667e382-71a9-4c07-bef7-bda97e09c0d2"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new ExchangeRestoreSession
{
AdditionalData = new Dictionary<string, object>
{
{
"mailboxRestoreArtifacts@delta" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.id", new UntypedString("1b014d8c-71fe-4d00-a01a-31850bc5b32c")
},
})
},
{
"destinationType", new UntypedString("inPlace")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.id", new UntypedString("2b014d8c-71fe-4d00-a01a-31850bc5b32")
},
})
},
{
"destinationType", new UntypedString("inPlace")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.id", new UntypedString("3b014d8c-71fe-4d00-a01a-31850bc5b32c")
},
})
},
{
"destinationType", new UntypedString("inPlace")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.id", new UntypedString("4b014d8c-71fe-4d00-a01a-31850bc5b32c")
},
})
},
{
"destinationType", new UntypedString("inPlace")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("99954f18-c8ec-4b62-85bf-cdf3b70b140e")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("4267e382-71a9-4c07-bef7-bda97e09c0d2")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("3667e382-71a9-4c07-bef7-bda97e09c0d2")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BackupRestore.ExchangeRestoreSessions["{exchangeRestoreSession-id}"].PatchAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
mgc solutions backup-restore exchange-restore-sessions patch --exchange-restore-session-id {exchangeRestoreSession-id} --body '{\
"mailboxRestoreArtifacts@delta": [\
{\
"restorePoint": { "@odata.id": "1b014d8c-71fe-4d00-a01a-31850bc5b32c" }, //Create a new mailbox restore artifact and add it under the Restore Session.\
"destinationType": "inPlace"\
},\
{\
"restorePoint": { "@odata.id": "2b014d8c-71fe-4d00-a01a-31850bc5b32" },\
"destinationType": "inPlace"\
},\
{\
"restorePoint": { "@odata.id": "3b014d8c-71fe-4d00-a01a-31850bc5b32c" },\
"destinationType": "inPlace"\
},\
{\
"restorePoint": { "@odata.id": "4b014d8c-71fe-4d00-a01a-31850bc5b32c" },\
"destinationType": "inPlace"\
},\
{\
"@removed": {\
"reason": "changed"\
},\
"id": "99954f18-c8ec-4b62-85bf-cdf3b70b140e"\
},\
{\
"@removed": {\
"reason": "changed"\
},\
"id": "4267e382-71a9-4c07-bef7-bda97e09c0d2"\
},\
{\
"@removed": {\
"reason": "changed"\
},\
"id": "3667e382-71a9-4c07-bef7-bda97e09c0d2"\
}\
]\
}\
'
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExchangeRestoreSession exchangeRestoreSession = new ExchangeRestoreSession();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> mailboxRestoreArtifactsDelta = new LinkedList<Object>();
property = new ();
restorePoint = new ();
restorePoint.setOdataId("1b014d8c-71fe-4d00-a01a-31850bc5b32c");
property.setRestorePoint(restorePoint);
property.setDestinationType("inPlace");
mailboxRestoreArtifactsDelta.add(property);
property1 = new ();
restorePoint1 = new ();
restorePoint1.setOdataId("2b014d8c-71fe-4d00-a01a-31850bc5b32");
property1.setRestorePoint(restorePoint1);
property1.setDestinationType("inPlace");
mailboxRestoreArtifactsDelta.add(property1);
property2 = new ();
restorePoint2 = new ();
restorePoint2.setOdataId("3b014d8c-71fe-4d00-a01a-31850bc5b32c");
property2.setRestorePoint(restorePoint2);
property2.setDestinationType("inPlace");
mailboxRestoreArtifactsDelta.add(property2);
property3 = new ();
restorePoint3 = new ();
restorePoint3.setOdataId("4b014d8c-71fe-4d00-a01a-31850bc5b32c");
property3.setRestorePoint(restorePoint3);
property3.setDestinationType("inPlace");
mailboxRestoreArtifactsDelta.add(property3);
property4 = new ();
removed = new ();
removed.setReason("changed");
property4.setRemoved(removed);
property4.setId("99954f18-c8ec-4b62-85bf-cdf3b70b140e");
mailboxRestoreArtifactsDelta.add(property4);
property5 = new ();
removed1 = new ();
removed1.setReason("changed");
property5.setRemoved(removed1);
property5.setId("4267e382-71a9-4c07-bef7-bda97e09c0d2");
mailboxRestoreArtifactsDelta.add(property5);
property6 = new ();
removed2 = new ();
removed2.setReason("changed");
property6.setRemoved(removed2);
property6.setId("3667e382-71a9-4c07-bef7-bda97e09c0d2");
mailboxRestoreArtifactsDelta.add(property6);
additionalData.put("mailboxRestoreArtifacts@delta", mailboxRestoreArtifactsDelta);
exchangeRestoreSession.setAdditionalData(additionalData);
ExchangeRestoreSession result = graphClient.solutions().backupRestore().exchangeRestoreSessions().byExchangeRestoreSessionId("{exchangeRestoreSession-id}").patch(exchangeRestoreSession);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const exchangeRestoreSession = {
'mailboxRestoreArtifacts@delta': [
{
restorePoint: { '@odata.id': '1b014d8c-71fe-4d00-a01a-31850bc5b32c' }, //Create a new mailbox restore artifact and add it under the Restore Session.
destinationType: 'inPlace'
},
{
restorePoint: { '@odata.id': '2b014d8c-71fe-4d00-a01a-31850bc5b32' },
destinationType: 'inPlace'
},
{
restorePoint: { '@odata.id': '3b014d8c-71fe-4d00-a01a-31850bc5b32c' },
destinationType: 'inPlace'
},
{
restorePoint: { '@odata.id': '4b014d8c-71fe-4d00-a01a-31850bc5b32c' },
destinationType: 'inPlace'
},
{
'@removed': {
reason: 'changed'
},
id: '99954f18-c8ec-4b62-85bf-cdf3b70b140e'
},
{
'@removed': {
reason: 'changed'
},
id: '4267e382-71a9-4c07-bef7-bda97e09c0d2'
},
{
'@removed': {
reason: 'changed'
},
id: '3667e382-71a9-4c07-bef7-bda97e09c0d2'
}
]
};
await client.api('/solutions/backupRestore/exchangeRestoreSessions/2b814d8c-71fd-4d00-a01a-31850bc5b32c')
.update(exchangeRestoreSession);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ExchangeRestoreSession;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExchangeRestoreSession();
$additionalData = [
'mailboxRestoreArtifacts@delta' => [
[
'restorePoint' => [
'@odata.id' => '1b014d8c-71fe-4d00-a01a-31850bc5b32c',
],
'destinationType' => 'inPlace',
],
[
'restorePoint' => [
'@odata.id' => '2b014d8c-71fe-4d00-a01a-31850bc5b32',
],
'destinationType' => 'inPlace',
],
[
'restorePoint' => [
'@odata.id' => '3b014d8c-71fe-4d00-a01a-31850bc5b32c',
],
'destinationType' => 'inPlace',
],
[
'restorePoint' => [
'@odata.id' => '4b014d8c-71fe-4d00-a01a-31850bc5b32c',
],
'destinationType' => 'inPlace',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '99954f18-c8ec-4b62-85bf-cdf3b70b140e',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '4267e382-71a9-4c07-bef7-bda97e09c0d2',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '3667e382-71a9-4c07-bef7-bda97e09c0d2',
],
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->solutions()->backupRestore()->exchangeRestoreSessions()->byExchangeRestoreSessionId('exchangeRestoreSession-id')->patch($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.BackupRestore
$params = @{
"mailboxRestoreArtifacts@delta" = @(
@{
restorePoint = @{
"@odata.id" = "1b014d8c-71fe-4d00-a01a-31850bc5b32c"
}
destinationType = "inPlace"
}
@{
restorePoint = @{
"@odata.id" = "2b014d8c-71fe-4d00-a01a-31850bc5b32"
}
destinationType = "inPlace"
}
@{
restorePoint = @{
"@odata.id" = "3b014d8c-71fe-4d00-a01a-31850bc5b32c"
}
destinationType = "inPlace"
}
@{
restorePoint = @{
"@odata.id" = "4b014d8c-71fe-4d00-a01a-31850bc5b32c"
}
destinationType = "inPlace"
}
@{
"@removed" = @{
reason = "changed"
}
id = "99954f18-c8ec-4b62-85bf-cdf3b70b140e"
}
@{
"@removed" = @{
reason = "changed"
}
id = "4267e382-71a9-4c07-bef7-bda97e09c0d2"
}
@{
"@removed" = @{
reason = "changed"
}
id = "3667e382-71a9-4c07-bef7-bda97e09c0d2"
}
)
}
Update-MgSolutionBackupRestoreExchangeRestoreSession -ExchangeRestoreSessionId $exchangeRestoreSessionId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.exchange_restore_session import ExchangeRestoreSession
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExchangeRestoreSession(
additional_data = {
"mailbox_restore_artifacts@delta" : [
{
"restore_point" : {
"@odata_id" : "1b014d8c-71fe-4d00-a01a-31850bc5b32c",
},
"destination_type" : "inPlace",
},
{
"restore_point" : {
"@odata_id" : "2b014d8c-71fe-4d00-a01a-31850bc5b32",
},
"destination_type" : "inPlace",
},
{
"restore_point" : {
"@odata_id" : "3b014d8c-71fe-4d00-a01a-31850bc5b32c",
},
"destination_type" : "inPlace",
},
{
"restore_point" : {
"@odata_id" : "4b014d8c-71fe-4d00-a01a-31850bc5b32c",
},
"destination_type" : "inPlace",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "99954f18-c8ec-4b62-85bf-cdf3b70b140e",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "4267e382-71a9-4c07-bef7-bda97e09c0d2",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "3667e382-71a9-4c07-bef7-bda97e09c0d2",
},
],
}
)
result = await graph_client.solutions.backup_restore.exchange_restore_sessions.by_exchange_restore_session_id('exchangeRestoreSession-id').patch(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
The following example shows the response.