POST https://graph.microsoft.com/v1.0/solutions/backupRestore/serviceApps/{71633878-8321-4950-bfaf-ed285bdd1461}/activate
Authorization: Bearer <Access-Token>
{
"effectiveDateTime": "2024-04-19T12:01:03.45Z"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Solutions.BackupRestore.ServiceApps.Item.Activate;
var requestBody = new ActivatePostRequestBody
{
EffectiveDateTime = DateTimeOffset.Parse("2024-04-19T12:01:03.45Z"),
};
// 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.ServiceApps["{serviceApp-id}"].Activate.PostAsync(requestBody, (requestConfiguration) =>
{
requestConfiguration.Headers.Add("Authorization", "Bearer <Access-Token>");
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphsolutions "github.com/microsoftgraph/msgraph-sdk-go/solutions"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("Authorization", "Bearer <Access-Token>")
configuration := &graphsolutions.BackupRestoreServiceAppsItemActivateRequestBuilderPostRequestConfiguration{
Headers: headers,
}
requestBody := graphsolutions.NewActivatePostRequestBody()
effectiveDateTime , err := time.Parse(time.RFC3339, "2024-04-19T12:01:03.45Z")
requestBody.SetEffectiveDateTime(&effectiveDateTime)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
activate, err := graphClient.Solutions().BackupRestore().ServiceApps().ByServiceAppId("serviceApp-id").Activate().Post(context.Background(), requestBody, configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.solutions.backuprestore.serviceapps.item.activate.ActivatePostRequestBody activatePostRequestBody = new com.microsoft.graph.solutions.backuprestore.serviceapps.item.activate.ActivatePostRequestBody();
OffsetDateTime effectiveDateTime = OffsetDateTime.parse("2024-04-19T12:01:03.45Z");
activatePostRequestBody.setEffectiveDateTime(effectiveDateTime);
var result = graphClient.solutions().backupRestore().serviceApps().byServiceAppId("{serviceApp-id}").activate().post(activatePostRequestBody, requestConfiguration -> {
requestConfiguration.headers.add("Authorization", "Bearer <Access-Token>");
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.solutions.backup_restore.service_apps.item.activate.activate_request_builder import ActivateRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from msgraph.generated.solutions.backuprestore.serviceapps.item.activate.activate_post_request_body import ActivatePostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ActivatePostRequestBody(
effective_date_time = "2024-04-19T12:01:03.45Z",
)
request_configuration = RequestConfiguration()
request_configuration.headers.add("Authorization", "Bearer <Access-Token>")
result = await graph_client.solutions.backup_restore.service_apps.by_service_app_id('serviceApp-id').activate.post(request_body, request_configuration = request_configuration)