APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
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.
Permission type
Least privileged permission
Higher privileged permissions
Delegated (work or school account)
BackupRestore-Restore.ReadWrite.All
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
BackupRestore-Restore.ReadWrite.All
Not available.
HTTP request
POST /solutions/backupRestore/exchangeRestoreSessions
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ExchangeRestoreSession
{
MailboxRestoreArtifacts = new List<MailboxRestoreArtifact>
{
new MailboxRestoreArtifact
{
RestorePoint = new RestorePoint
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.id" , "1f1fccc3-a642-4f61-bf49-f37b9a888279"
},
},
},
DestinationType = DestinationType.InPlace,
},
new MailboxRestoreArtifact
{
RestorePoint = new RestorePoint
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.id" , "1f1fccc3-a642-4f61-bf49-f37b9a888280"
},
},
},
DestinationType = DestinationType.InPlace,
},
},
};
// 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.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewExchangeRestoreSession()
mailboxRestoreArtifact := graphmodels.NewMailboxRestoreArtifact()
restorePoint := graphmodels.NewRestorePoint()
additionalData := map[string]interface{}{
"@odata.id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
restorePoint.SetAdditionalData(additionalData)
mailboxRestoreArtifact.SetRestorePoint(restorePoint)
destinationType := graphmodels.INPLACE_DESTINATIONTYPE
mailboxRestoreArtifact.SetDestinationType(&destinationType)
mailboxRestoreArtifact1 := graphmodels.NewMailboxRestoreArtifact()
restorePoint := graphmodels.NewRestorePoint()
additionalData := map[string]interface{}{
"@odata.id" : "1f1fccc3-a642-4f61-bf49-f37b9a888280",
}
restorePoint.SetAdditionalData(additionalData)
mailboxRestoreArtifact1.SetRestorePoint(restorePoint)
destinationType := graphmodels.INPLACE_DESTINATIONTYPE
mailboxRestoreArtifact1.SetDestinationType(&destinationType)
mailboxRestoreArtifacts := []graphmodels.MailboxRestoreArtifactable {
mailboxRestoreArtifact,
mailboxRestoreArtifact1,
}
requestBody.SetMailboxRestoreArtifacts(mailboxRestoreArtifacts)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
exchangeRestoreSessions, err := graphClient.Solutions().BackupRestore().ExchangeRestoreSessions().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExchangeRestoreSession exchangeRestoreSession = new ExchangeRestoreSession();
LinkedList<MailboxRestoreArtifact> mailboxRestoreArtifacts = new LinkedList<MailboxRestoreArtifact>();
MailboxRestoreArtifact mailboxRestoreArtifact = new MailboxRestoreArtifact();
RestorePoint restorePoint = new RestorePoint();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888279");
restorePoint.setAdditionalData(additionalData);
mailboxRestoreArtifact.setRestorePoint(restorePoint);
mailboxRestoreArtifact.setDestinationType(DestinationType.InPlace);
mailboxRestoreArtifacts.add(mailboxRestoreArtifact);
MailboxRestoreArtifact mailboxRestoreArtifact1 = new MailboxRestoreArtifact();
RestorePoint restorePoint1 = new RestorePoint();
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888280");
restorePoint1.setAdditionalData(additionalData1);
mailboxRestoreArtifact1.setRestorePoint(restorePoint1);
mailboxRestoreArtifact1.setDestinationType(DestinationType.InPlace);
mailboxRestoreArtifacts.add(mailboxRestoreArtifact1);
exchangeRestoreSession.setMailboxRestoreArtifacts(mailboxRestoreArtifacts);
ExchangeRestoreSession result = graphClient.solutions().backupRestore().exchangeRestoreSessions().post(exchangeRestoreSession);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\ExchangeRestoreSession;
use Microsoft\Graph\Beta\Generated\Models\MailboxRestoreArtifact;
use Microsoft\Graph\Beta\Generated\Models\RestorePoint;
use Microsoft\Graph\Beta\Generated\Models\DestinationType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExchangeRestoreSession();
$mailboxRestoreArtifactsMailboxRestoreArtifact1 = new MailboxRestoreArtifact();
$mailboxRestoreArtifactsMailboxRestoreArtifact1RestorePoint = new RestorePoint();
$additionalData = [
'@odata.id' => '1f1fccc3-a642-4f61-bf49-f37b9a888279',
];
$mailboxRestoreArtifactsMailboxRestoreArtifact1RestorePoint->setAdditionalData($additionalData);
$mailboxRestoreArtifactsMailboxRestoreArtifact1->setRestorePoint($mailboxRestoreArtifactsMailboxRestoreArtifact1RestorePoint);
$mailboxRestoreArtifactsMailboxRestoreArtifact1->setDestinationType(new DestinationType('inPlace'));
$mailboxRestoreArtifactsArray []= $mailboxRestoreArtifactsMailboxRestoreArtifact1;
$mailboxRestoreArtifactsMailboxRestoreArtifact2 = new MailboxRestoreArtifact();
$mailboxRestoreArtifactsMailboxRestoreArtifact2RestorePoint = new RestorePoint();
$additionalData = [
'@odata.id' => '1f1fccc3-a642-4f61-bf49-f37b9a888280',
];
$mailboxRestoreArtifactsMailboxRestoreArtifact2RestorePoint->setAdditionalData($additionalData);
$mailboxRestoreArtifactsMailboxRestoreArtifact2->setRestorePoint($mailboxRestoreArtifactsMailboxRestoreArtifact2RestorePoint);
$mailboxRestoreArtifactsMailboxRestoreArtifact2->setDestinationType(new DestinationType('inPlace'));
$mailboxRestoreArtifactsArray []= $mailboxRestoreArtifactsMailboxRestoreArtifact2;
$requestBody->setMailboxRestoreArtifacts($mailboxRestoreArtifactsArray);
$result = $graphServiceClient->solutions()->backupRestore()->exchangeRestoreSessions()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.exchange_restore_session import ExchangeRestoreSession
from msgraph_beta.generated.models.mailbox_restore_artifact import MailboxRestoreArtifact
from msgraph_beta.generated.models.restore_point import RestorePoint
from msgraph_beta.generated.models.destination_type import DestinationType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExchangeRestoreSession(
mailbox_restore_artifacts = [
MailboxRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
),
destination_type = DestinationType.InPlace,
),
MailboxRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888280",
}
),
destination_type = DestinationType.InPlace,
),
],
)
result = await graph_client.solutions.backup_restore.exchange_restore_sessions.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ExchangeRestoreSession
{
OdataType = "#microsoft.graph.exchangeRestoreSession",
GranularMailboxRestoreArtifacts = new List<GranularMailboxRestoreArtifact>
{
new GranularMailboxRestoreArtifact
{
RestorePoint = new RestorePoint
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.id" , "1f1fccc3-a642-4f61-bf49-f37b9a888279"
},
},
},
DestinationType = DestinationType.InPlace,
SearchResponseId = "M2UyZDAwMDAwMDMxMzkzYTMyNj",
},
},
};
// 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.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewExchangeRestoreSession()
granularMailboxRestoreArtifact := graphmodels.NewGranularMailboxRestoreArtifact()
restorePoint := graphmodels.NewRestorePoint()
additionalData := map[string]interface{}{
"@odata.id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
restorePoint.SetAdditionalData(additionalData)
granularMailboxRestoreArtifact.SetRestorePoint(restorePoint)
destinationType := graphmodels.INPLACE_DESTINATIONTYPE
granularMailboxRestoreArtifact.SetDestinationType(&destinationType)
searchResponseId := "M2UyZDAwMDAwMDMxMzkzYTMyNj"
granularMailboxRestoreArtifact.SetSearchResponseId(&searchResponseId)
granularMailboxRestoreArtifacts := []graphmodels.GranularMailboxRestoreArtifactable {
granularMailboxRestoreArtifact,
}
requestBody.SetGranularMailboxRestoreArtifacts(granularMailboxRestoreArtifacts)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
exchangeRestoreSessions, err := graphClient.Solutions().BackupRestore().ExchangeRestoreSessions().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExchangeRestoreSession exchangeRestoreSession = new ExchangeRestoreSession();
exchangeRestoreSession.setOdataType("#microsoft.graph.exchangeRestoreSession");
LinkedList<GranularMailboxRestoreArtifact> granularMailboxRestoreArtifacts = new LinkedList<GranularMailboxRestoreArtifact>();
GranularMailboxRestoreArtifact granularMailboxRestoreArtifact = new GranularMailboxRestoreArtifact();
RestorePoint restorePoint = new RestorePoint();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888279");
restorePoint.setAdditionalData(additionalData);
granularMailboxRestoreArtifact.setRestorePoint(restorePoint);
granularMailboxRestoreArtifact.setDestinationType(DestinationType.InPlace);
granularMailboxRestoreArtifact.setSearchResponseId("M2UyZDAwMDAwMDMxMzkzYTMyNj");
granularMailboxRestoreArtifacts.add(granularMailboxRestoreArtifact);
exchangeRestoreSession.setGranularMailboxRestoreArtifacts(granularMailboxRestoreArtifacts);
ExchangeRestoreSession result = graphClient.solutions().backupRestore().exchangeRestoreSessions().post(exchangeRestoreSession);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\ExchangeRestoreSession;
use Microsoft\Graph\Beta\Generated\Models\GranularMailboxRestoreArtifact;
use Microsoft\Graph\Beta\Generated\Models\RestorePoint;
use Microsoft\Graph\Beta\Generated\Models\DestinationType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExchangeRestoreSession();
$requestBody->setOdataType('#microsoft.graph.exchangeRestoreSession');
$granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1 = new GranularMailboxRestoreArtifact();
$granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1RestorePoint = new RestorePoint();
$additionalData = [
'@odata.id' => '1f1fccc3-a642-4f61-bf49-f37b9a888279',
];
$granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1RestorePoint->setAdditionalData($additionalData);
$granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1->setRestorePoint($granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1RestorePoint);
$granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1->setDestinationType(new DestinationType('inPlace'));
$granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1->setSearchResponseId('M2UyZDAwMDAwMDMxMzkzYTMyNj');
$granularMailboxRestoreArtifactsArray []= $granularMailboxRestoreArtifactsGranularMailboxRestoreArtifact1;
$requestBody->setGranularMailboxRestoreArtifacts($granularMailboxRestoreArtifactsArray);
$result = $graphServiceClient->solutions()->backupRestore()->exchangeRestoreSessions()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.exchange_restore_session import ExchangeRestoreSession
from msgraph_beta.generated.models.granular_mailbox_restore_artifact import GranularMailboxRestoreArtifact
from msgraph_beta.generated.models.restore_point import RestorePoint
from msgraph_beta.generated.models.destination_type import DestinationType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExchangeRestoreSession(
odata_type = "#microsoft.graph.exchangeRestoreSession",
granular_mailbox_restore_artifacts = [
GranularMailboxRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
),
destination_type = DestinationType.InPlace,
search_response_id = "M2UyZDAwMDAwMDMxMzkzYTMyNj",
),
],
)
result = await graph_client.solutions.backup_restore.exchange_restore_sessions.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.