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 permissions
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/sharePointRestoreSessions
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new SharePointRestoreSession
{
SiteRestoreArtifacts = new List<SiteRestoreArtifact>
{
new SiteRestoreArtifact
{
RestorePoint = new RestorePoint
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.id" , "1f1fccc3-a642-4f61-bf49-f37b9a888279"
},
},
},
DestinationType = DestinationType.InPlace,
},
new SiteRestoreArtifact
{
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.SharePointRestoreSessions.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.NewSharePointRestoreSession()
siteRestoreArtifact := graphmodels.NewSiteRestoreArtifact()
restorePoint := graphmodels.NewRestorePoint()
additionalData := map[string]interface{}{
"@odata.id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
restorePoint.SetAdditionalData(additionalData)
siteRestoreArtifact.SetRestorePoint(restorePoint)
destinationType := graphmodels.INPLACE_DESTINATIONTYPE
siteRestoreArtifact.SetDestinationType(&destinationType)
siteRestoreArtifact1 := graphmodels.NewSiteRestoreArtifact()
restorePoint := graphmodels.NewRestorePoint()
additionalData := map[string]interface{}{
"@odata.id" : "1f1fccc3-a642-4f61-bf49-f37b9a888280",
}
restorePoint.SetAdditionalData(additionalData)
siteRestoreArtifact1.SetRestorePoint(restorePoint)
destinationType := graphmodels.INPLACE_DESTINATIONTYPE
siteRestoreArtifact1.SetDestinationType(&destinationType)
siteRestoreArtifacts := []graphmodels.SiteRestoreArtifactable {
siteRestoreArtifact,
siteRestoreArtifact1,
}
requestBody.SetSiteRestoreArtifacts(siteRestoreArtifacts)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
sharePointRestoreSessions, err := graphClient.Solutions().BackupRestore().SharePointRestoreSessions().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);
SharePointRestoreSession sharePointRestoreSession = new SharePointRestoreSession();
LinkedList<SiteRestoreArtifact> siteRestoreArtifacts = new LinkedList<SiteRestoreArtifact>();
SiteRestoreArtifact siteRestoreArtifact = new SiteRestoreArtifact();
RestorePoint restorePoint = new RestorePoint();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888279");
restorePoint.setAdditionalData(additionalData);
siteRestoreArtifact.setRestorePoint(restorePoint);
siteRestoreArtifact.setDestinationType(DestinationType.InPlace);
siteRestoreArtifacts.add(siteRestoreArtifact);
SiteRestoreArtifact siteRestoreArtifact1 = new SiteRestoreArtifact();
RestorePoint restorePoint1 = new RestorePoint();
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888280");
restorePoint1.setAdditionalData(additionalData1);
siteRestoreArtifact1.setRestorePoint(restorePoint1);
siteRestoreArtifact1.setDestinationType(DestinationType.InPlace);
siteRestoreArtifacts.add(siteRestoreArtifact1);
sharePointRestoreSession.setSiteRestoreArtifacts(siteRestoreArtifacts);
SharePointRestoreSession result = graphClient.solutions().backupRestore().sharePointRestoreSessions().post(sharePointRestoreSession);
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\SharePointRestoreSession;
use Microsoft\Graph\Beta\Generated\Models\SiteRestoreArtifact;
use Microsoft\Graph\Beta\Generated\Models\RestorePoint;
use Microsoft\Graph\Beta\Generated\Models\DestinationType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SharePointRestoreSession();
$siteRestoreArtifactsSiteRestoreArtifact1 = new SiteRestoreArtifact();
$siteRestoreArtifactsSiteRestoreArtifact1RestorePoint = new RestorePoint();
$additionalData = [
'@odata.id' => '1f1fccc3-a642-4f61-bf49-f37b9a888279',
];
$siteRestoreArtifactsSiteRestoreArtifact1RestorePoint->setAdditionalData($additionalData);
$siteRestoreArtifactsSiteRestoreArtifact1->setRestorePoint($siteRestoreArtifactsSiteRestoreArtifact1RestorePoint);
$siteRestoreArtifactsSiteRestoreArtifact1->setDestinationType(new DestinationType('inPlace'));
$siteRestoreArtifactsArray []= $siteRestoreArtifactsSiteRestoreArtifact1;
$siteRestoreArtifactsSiteRestoreArtifact2 = new SiteRestoreArtifact();
$siteRestoreArtifactsSiteRestoreArtifact2RestorePoint = new RestorePoint();
$additionalData = [
'@odata.id' => '1f1fccc3-a642-4f61-bf49-f37b9a888280',
];
$siteRestoreArtifactsSiteRestoreArtifact2RestorePoint->setAdditionalData($additionalData);
$siteRestoreArtifactsSiteRestoreArtifact2->setRestorePoint($siteRestoreArtifactsSiteRestoreArtifact2RestorePoint);
$siteRestoreArtifactsSiteRestoreArtifact2->setDestinationType(new DestinationType('inPlace'));
$siteRestoreArtifactsArray []= $siteRestoreArtifactsSiteRestoreArtifact2;
$requestBody->setSiteRestoreArtifacts($siteRestoreArtifactsArray);
$result = $graphServiceClient->solutions()->backupRestore()->sharePointRestoreSessions()->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.share_point_restore_session import SharePointRestoreSession
from msgraph_beta.generated.models.site_restore_artifact import SiteRestoreArtifact
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 = SharePointRestoreSession(
site_restore_artifacts = [
SiteRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
),
destination_type = DestinationType.InPlace,
),
SiteRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888280",
}
),
destination_type = DestinationType.InPlace,
),
],
)
result = await graph_client.solutions.backup_restore.share_point_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.