インシデントを更新する
[アーティクル]
10/31/2023
8 人の共同作成者
フィードバック
この記事の内容
名前空間: microsoft.graph.security
インシデント オブジェクトのプロパティを更新します。
この API は、次の国内クラウド展開 で使用できます。
グローバル サービス
米国政府機関 L4
米国政府機関 L5 (DOD)
21Vianet が運営する中国
✅
✅
✅
❌
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ 、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「 アクセス許可の種類 」を参照してください。 これらのアクセス許可の詳細については、 アクセス許可のリファレンスを参照してください 。
アクセス許可の種類
最小特権アクセス許可
特権の高いアクセス許可
委任 (職場または学校のアカウント)
SecurityIncident.ReadWrite.All
注意事項なし。
委任 (個人用 Microsoft アカウント)
サポートされていません。
サポートされていません。
アプリケーション
SecurityIncident.ReadWrite.All
注意事項なし。
HTTP 要求
PATCH /security/incidents/{incidentId}
名前
説明
Authorization
ベアラー {token}。 必須です。 認証と承認 の詳細については、こちらをご覧ください。
Content-Type
application/json. 必須です。
要求本文
要求本文で、更新すべきプロパティの値のみ を指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
プロパティ
型
説明
assignedTo
String
インシデントの所有者。所有者が割り当てられていない場合は null。 無料の編集可能なテキスト。
classification
microsoft.graph.security.alertClassification
インシデントの仕様。 可能な値は、unknown
、falsePositive
、truePositive
、informationalExpectedActivity
、unknownFutureValue
です。
決定
microsoft.graph.security.alertDetermination
インシデントの決定を指定します。 可能な値は、unknown
、apt
、malware
、securityPersonnel
、securityTesting
、unwantedSoftware
、other
、multiStagedAttack
、compromisedUser
、phishing
、maliciousUserActivity
、notMalicious
、notEnoughDataToValidate
、confirmedUserActivity
、lineOfBusinessApplication
、unknownFutureValue
です。
status
microsoft.graph.security.incidentStatus
インシデントの状態。 使用可能な値: active
、resolved
、redirected
、unknownFutureValue
。
customTags
String collection
インシデントに関連付けられているカスタム タグの配列。
応答
成功した場合、このメソッドは 200 OK
応答コードと、応答本文で更新された インシデント オブジェクトを返します。
例
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/v1.0/security/incidents/2972395
Content-Type: application/json
{
"classification": "TruePositive",
"determination": "MultiStagedAttack",
"customTags": [
"Demo"
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Security;
var requestBody = new Incident
{
Classification = AlertClassification.TruePositive,
Determination = AlertDetermination.MultiStagedAttack,
CustomTags = new List<string>
{
"Demo",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Incidents["{incident-id}"].PatchAsync(requestBody);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc security incidents patch --incident-id {incident-id} --body '{\
"classification": "TruePositive",\
"determination": "MultiStagedAttack",\
"customTags": [\
"Demo"\
]\
}\
'
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelssecurity "github.com/microsoftgraph/msgraph-sdk-go/models/security"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodelssecurity.NewIncident()
classification := graphmodels.TRUEPOSITIVE_ALERTCLASSIFICATION
requestBody.SetClassification(&classification)
determination := graphmodels.MULTISTAGEDATTACK_ALERTDETERMINATION
requestBody.SetDetermination(&determination)
customTags := []string {
"Demo",
}
requestBody.SetCustomTags(customTags)
incidents, err := graphClient.Security().Incidents().ByIncidentId("incident-id").Patch(context.Background(), requestBody, nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.security.Incident incident = new com.microsoft.graph.models.security.Incident();
incident.setClassification(com.microsoft.graph.models.security.AlertClassification.TruePositive);
incident.setDetermination(com.microsoft.graph.models.security.AlertDetermination.MultiStagedAttack);
LinkedList<String> customTags = new LinkedList<String>();
customTags.add("Demo");
incident.setCustomTags(customTags);
com.microsoft.graph.models.security.Incident result = graphClient.security().incidents().byIncidentId("{incident-id}").patch(incident);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const incident = {
classification: 'TruePositive',
determination: 'MultiStagedAttack',
customTags: [
'Demo'
]
};
await client.api('/security/incidents/2972395')
.update(incident);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Incident;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Incident();
$requestBody->setClassification(new AlertClassification('truePositive'));
$requestBody->setDetermination(new AlertDetermination('multiStagedAttack'));
$requestBody->setCustomTags(['Demo', ]);
$result = $graphServiceClient->security()->incidents()->byIncidentId('incident-id')->patch($requestBody)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
Import-Module Microsoft.Graph.Security
$params = @{
classification = "TruePositive"
determination = "MultiStagedAttack"
customTags = @(
"Demo"
)
}
Update-MgSecurityIncident -IncidentId $incidentId -BodyParameter $params
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.models.incident import Incident
graph_client = GraphServiceClient(credentials, scopes)
request_body = Incident(
classification = AlertClassification.TruePositive,
determination = AlertDetermination.MultiStagedAttack,
custom_tags = [
"Demo",
],
)
result = await graph_client.security.incidents.by_incident_id('incident-id').patch(request_body)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.incident",
"id": "2972395",
"incidentWebUrl": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47",
"redirectIncidentId": null,
"displayName": "Multi-stage incident involving Initial access & Command and control on multiple endpoints reported by multiple sources",
"tenantId": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c",
"createdDateTime": "2021-08-13T08:43:35.5533333Z",
"lastUpdateDateTime": "2021-09-30T09:35:45.1133333Z",
"assignedTo": "KaiC@contoso.com",
"classification": "TruePositive",
"determination": "MultiStagedAttack",
"status": "Active",
"severity": "Medium",
"customTags": [
"Demo"
],
"comments": [
{
"comment": "Demo incident",
"createdBy": "DavidS@contoso.com",
"createdTime": "2021-09-30T12:07:37.2756993Z"
}
],
"systemTags" : [
"Defender Experts"
],
"description" : "Microsoft observed Raspberry Robin worm activity spreading through infected USB on multiple devices in your environment. From available intel, these infections could be a potential precursor activity to ransomware deployment. ..."
}