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.
Update multiple alerts in one request instead of multiple requests.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
SecurityEvents.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
SecurityEvents.ReadWrite.All
HTTP request
POST /security/alerts/updateAlerts
Request headers
Name
Description
Authorization
Bearer {code}
Request body
In the request body, provide a JSON object with the following parameters. Each entity must have id and vendorInformation properties. For details about properties that can be updated, see update alert.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Beta.Security.Alerts.UpdateAlerts.UpdateAlertsPostRequestBody
{
Value = new List<Alert>
{
new Alert
{
AssignedTo = "String",
ClosedDateTime = DateTimeOffset.Parse("String (timestamp)"),
Comments = new List<string>
{
"String",
},
Feedback = new AlertFeedback
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.type" , "microsoft.graph.alertFeedback"
},
},
},
Id = "String (identifier)",
Status = new AlertStatus
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.type" , "microsoft.graph.alertStatus"
},
},
},
Tags = new List<string>
{
"String",
},
VendorInformation = new SecurityVendorInformation
{
Provider = "String",
Vendor = "String",
},
},
},
};
var result = await graphClient.Security.Alerts.UpdateAlerts.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.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<Alert> valueList = new LinkedList<Alert>();
Alert value = new Alert();
value.assignedTo = "String";
value.closedDateTime = OffsetDateTimeSerializer.deserialize("String (timestamp)");
LinkedList<String> commentsList = new LinkedList<String>();
commentsList.add("String");
value.comments = commentsList;
AlertFeedback feedback = new AlertFeedback();
value.feedback = feedback;
value.id = "String (identifier)";
AlertStatus status = new AlertStatus();
value.status = status;
LinkedList<String> tagsList = new LinkedList<String>();
tagsList.add("String");
value.tags = tagsList;
SecurityVendorInformation vendorInformation = new SecurityVendorInformation();
vendorInformation.provider = "String";
vendorInformation.vendor = "String";
value.vendorInformation = vendorInformation;
valueList.add(value);
AlertCollectionResponse alertCollectionResponse = new AlertCollectionResponse();
alertCollectionResponse.value = valueList;
AlertCollectionPage alertCollectionPage = new AlertCollectionPage(alertCollectionResponse, null);
graphClient.security().alerts()
.updateAlerts(AlertUpdateAlertsParameterSet
.newBuilder()
.withValue(valueList)
.build())
.buildRequest()
.post();
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
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new UpdateAlertsPostRequestBody();
$valueAlert1 = new Alert();
$valueAlert1->setAssignedTo('String');
$valueAlert1->setClosedDateTime(new DateTime('String (timestamp)'));
$valueAlert1->setComments(['String', ]);
$valueAlert1Feedback = new AlertFeedback();
$additionalData = [
'@odata.type' => 'microsoft.graph.alertFeedback',
];
$valueAlert1Feedback->setAdditionalData($additionalData);
$valueAlert1->setFeedback($valueAlert1Feedback);
$valueAlert1->setId('String (identifier)');
$valueAlert1Status = new AlertStatus();
$additionalData = [
'@odata.type' => 'microsoft.graph.alertStatus',
];
$valueAlert1Status->setAdditionalData($additionalData);
$valueAlert1->setStatus($valueAlert1Status);
$valueAlert1->setTags(['String', ]);
$valueAlert1VendorInformation = new SecurityVendorInformation();
$valueAlert1VendorInformation->setProvider('String');
$valueAlert1VendorInformation->setVendor('String');
$valueAlert1->setVendorInformation($valueAlert1VendorInformation);
$valueArray []= $valueAlert1;
$requestBody->setValue($valueArray);
$result = $graphServiceClient->security()->alerts()->updateAlerts()->post($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.