命名空间:microsoft.graph.security
重要
Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
将一个或多个 警报 资源移动到现有 事件。
此 API 可用于以下国家级云部署。
| 全局服务 |
美国政府 L4 |
美国政府 L5 (DOD) |
由世纪互联运营的中国 |
| ✅ |
✅ |
✅ |
❌ |
权限
为此 API 选择标记为最低特权的权限。
只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
| 权限类型 |
最低特权权限 |
更高特权权限 |
| 委派(工作或学校帐户) |
SecurityData.Manage.All |
不可用。 |
| 委派(个人 Microsoft 帐户) |
不支持。 |
不支持。 |
| 应用程序 |
SecurityData.Manage.All |
不可用。 |
重要
对于使用工作或学校帐户的委派访问,必须为登录用户分配受支持的Microsoft Entra角色或授予此操作所需权限的自定义角色。 此操作支持以下内置角色,这些角色仅提供所需的最小特权:
-
安全操作员。 可以在 Microsoft 365 Defender 门户中管理警报以及查看、调查和响应安全警报。
这是此操作的最低特权角色。
-
安全管理员。 有权管理 Microsoft 365 Defender 门户中的安全相关功能,包括管理安全威胁和警报。
HTTP 请求
POST /security/alerts_v2/moveAlerts
| 名称 |
说明 |
| Authorization |
持有者 {token}。 必填。 详细了解 身份验证和授权。 |
| Content-Type |
application/json. 必需。 |
请求正文
在请求正文中,提供具有以下参数的 JSON 对象。
响应
如果成功,此操作将在 200 OK 响应正文中返回响应代码和 microsoft.graph.security.mergeResponse 对象。
示例
示例 1:将警报移动到事件
请求
以下示例将两个警报移动到现有事件。
POST https://graph.microsoft.com/beta/security/alerts_v2/moveAlerts
Content-Type: application/json
{
"alertIds": [
"da637551227677560813_-961444813",
"da637551227677560813_-961444814"
],
"incidentId": "2972395",
"alertComment": "Moving alerts for investigation consolidation",
"newCorrelationReasons": "sameAsset, temporalProximity"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Security.Alerts_v2.MicrosoftGraphSecurityMoveAlerts;
using Microsoft.Graph.Beta.Models.Security;
var requestBody = new MoveAlertsPostRequestBody
{
AlertIds = new List<string>
{
"da637551227677560813_-961444813",
"da637551227677560813_-961444814",
},
IncidentId = "2972395",
AlertComment = "Moving alerts for investigation consolidation",
NewCorrelationReasons = CorrelationReason.SameAsset | CorrelationReason.TemporalProximity,
};
// To initialize your graphClient, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Alerts_v2.MicrosoftGraphSecurityMoveAlerts.PostAsync(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"
graphsecurity "github.com/microsoftgraph/msgraph-beta-sdk-go/security"
graphmodelssecurity "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security"
//other-imports
)
requestBody := graphsecurity.NewMoveAlertsPostRequestBody()
alertIds := []string {
"da637551227677560813_-961444813",
"da637551227677560813_-961444814",
}
requestBody.SetAlertIds(alertIds)
incidentId := "2972395"
requestBody.SetIncidentId(&incidentId)
alertComment := "Moving alerts for investigation consolidation"
requestBody.SetAlertComment(&alertComment)
newCorrelationReasons := graphmodels.SAMEASSET, TEMPORALPROXIMITY_CORRELATIONREASON
requestBody.SetNewCorrelationReasons(&newCorrelationReasons)
// To initialize your graphClient, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=go
microsoftGraphSecurityMoveAlerts, err := graphClient.Security().Alerts_v2().MicrosoftGraphSecurityMoveAlerts().Post(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.security.alerts_v2.microsoftgraphsecuritymovealerts.MoveAlertsPostRequestBody moveAlertsPostRequestBody = new com.microsoft.graph.beta.security.alerts_v2.microsoftgraphsecuritymovealerts.MoveAlertsPostRequestBody();
LinkedList<String> alertIds = new LinkedList<String>();
alertIds.add("da637551227677560813_-961444813");
alertIds.add("da637551227677560813_-961444814");
moveAlertsPostRequestBody.setAlertIds(alertIds);
moveAlertsPostRequestBody.setIncidentId("2972395");
moveAlertsPostRequestBody.setAlertComment("Moving alerts for investigation consolidation");
moveAlertsPostRequestBody.setNewCorrelationReasons(EnumSet.of(com.microsoft.graph.beta.models.security.CorrelationReason.SameAsset, com.microsoft.graph.beta.models.security.CorrelationReason.TemporalProximity));
var result = graphClient.security().alertsV2().microsoftGraphSecurityMoveAlerts().post(moveAlertsPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const mergeResponse = {
alertIds: [
'da637551227677560813_-961444813',
'da637551227677560813_-961444814'
],
incidentId: '2972395',
alertComment: 'Moving alerts for investigation consolidation',
newCorrelationReasons: 'sameAsset, temporalProximity'
};
await client.api('/security/alerts_v2/moveAlerts')
.version('beta')
.post(mergeResponse);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Security\Alerts_v2\MicrosoftGraphSecurityMoveAlerts\MoveAlertsPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\Security\CorrelationReason;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MoveAlertsPostRequestBody();
$requestBody->setAlertIds(['da637551227677560813_-961444813', 'da637551227677560813_-961444814', ]);
$requestBody->setIncidentId('2972395');
$requestBody->setAlertComment('Moving alerts for investigation consolidation');
$requestBody->setNewCorrelationReasons(new CorrelationReason('sameAsset, temporalProximity'));
$result = $graphServiceClient->security()->alerts_v2()->microsoftGraphSecurityMoveAlerts()->post($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.security.alerts_v2.microsoft_graph_security_move_alerts.move_alerts_post_request_body import MoveAlertsPostRequestBody
from msgraph_beta.generated.models.correlation_reason import CorrelationReason
# To initialize your graph_client, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MoveAlertsPostRequestBody(
alert_ids = [
"da637551227677560813_-961444813",
"da637551227677560813_-961444814",
],
incident_id = "2972395",
alert_comment = "Moving alerts for investigation consolidation",
new_correlation_reasons = CorrelationReason.SameAsset | CorrelationReason.TemporalProximity,
)
result = await graph_client.security.alerts_v2.microsoft_graph_security_move_alerts.post(request_body)
响应
以下示例显示了相应的响应。
HTTP/1.1 200 OK
Content-type: application/json
{
"targetIncidentId": "2972395"
}