// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Solutions.BackupRestore.ProtectionPolicies["{protectionPolicyBase-id}"].DeleteAsync((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"
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.BackupRestoreProtectionPoliciesItemRequestBuilderDeleteRequestConfiguration{
Headers: headers,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Solutions().BackupRestore().ProtectionPolicies().ByProtectionPolicyBaseId("protectionPolicyBase-id").Delete(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.solutions().backupRestore().protectionPolicies().byProtectionPolicyBaseId("{protectionPolicyBase-id}").delete(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.protection_policies.item.protection_policy_base_item_request_builder import ProtectionPolicyBaseItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_configuration = RequestConfiguration()
request_configuration.headers.add("Authorization", "Bearer <Access-Token>")
await graph_client.solutions.backup_restore.protection_policies.by_protection_policy_base_id('protectionPolicyBase-id').delete(request_configuration = request_configuration)