// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Partner.Security;
var requestBody = new PartnerSecurityAlert
{
Status = SecurityAlertStatus.Resolved,
ResolvedReason = SecurityAlertResolvedReason.Fraud,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Partner.SecurityAlerts["{partnerSecurityAlert-id}"].PatchAsync(requestBody);
// 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"
graphmodelspartnersecurity "github.com/microsoftgraph/msgraph-beta-sdk-go/models/partner/security"
//other-imports
)
requestBody := graphmodelspartnersecurity.NewPartnerSecurityAlert()
status := graphmodels.RESOLVED_SECURITYALERTSTATUS
requestBody.SetStatus(&status)
resolvedReason := graphmodels.FRAUD_SECURITYALERTRESOLVEDREASON
requestBody.SetResolvedReason(&resolvedReason)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
securityAlerts, err := graphClient.Security().Partner().SecurityAlerts().ByPartnerSecurityAlertId("partnerSecurityAlert-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.partner.security.PartnerSecurityAlert partnerSecurityAlert = new com.microsoft.graph.beta.models.partner.security.PartnerSecurityAlert();
partnerSecurityAlert.setStatus(com.microsoft.graph.beta.models.partner.security.SecurityAlertStatus.Resolved);
partnerSecurityAlert.setResolvedReason(com.microsoft.graph.beta.models.partner.security.SecurityAlertResolvedReason.Fraud);
com.microsoft.graph.models.partner.security.PartnerSecurityAlert result = graphClient.security().partner().securityAlerts().byPartnerSecurityAlertId("{partnerSecurityAlert-id}").patch(partnerSecurityAlert);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Partner\Security\PartnerSecurityAlert;
use Microsoft\Graph\Beta\Generated\Models\Partner\Security\SecurityAlertStatus;
use Microsoft\Graph\Beta\Generated\Models\Partner\Security\SecurityAlertResolvedReason;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new PartnerSecurityAlert();
$requestBody->setStatus(new SecurityAlertStatus('resolved'));
$requestBody->setResolvedReason(new SecurityAlertResolvedReason('fraud'));
$result = $graphServiceClient->security()->partner()->securityAlerts()->byPartnerSecurityAlertId('partnerSecurityAlert-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.partner.security.partner_security_alert import PartnerSecurityAlert
from msgraph_beta.generated.models.security_alert_status import SecurityAlertStatus
from msgraph_beta.generated.models.security_alert_resolved_reason import SecurityAlertResolvedReason
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = PartnerSecurityAlert(
status = SecurityAlertStatus.Resolved,
resolved_reason = SecurityAlertResolvedReason.Fraud,
)
result = await graph_client.security.partner.security_alerts.by_partner_security_alert_id('partnerSecurityAlert-id').patch(request_body)