名前空間: microsoft.graph.partner.security
重要
Microsoft Graph の /beta
バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
partnerSecurityAlert オブジェクトのプロパティを更新します。
この API は、次の国内クラウド展開で使用できます。
グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
PartnerSecurity.ReadWrite.All |
注意事項なし。 |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
PartnerSecurity.ReadWrite.All |
注意事項なし。 |
HTTP 要求
PATCH /security/partner/securityAlerts/{partnerSecurityAlertId}
名前 |
説明 |
Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、更新するプロパティの値 のみを 指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
プロパティ |
型 |
説明 |
status |
microsoft.graph.partner.security.securityAlertStatus |
アラートの状態。 使用可能な値: active 、resolved 、investigating 、unknownFutureValue 。 必須です。 |
resolvedReason |
microsoft.graph.partner.security.securityAlertResolvedReason |
アラートに対処するためにパートナーによって提供される理由。 使用可能な値: legitimate 、ignore 、fraud 、unknownFutureValue 。 省略可能。 |
応答
成功した場合、このメソッドは 200 OK
応答コードと、応答本文で更新 された microsoft.graph.partner.security.partnerSecurityAlert オブジェクトを返します。
例
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/beta/security/partner/securityAlerts/d8b202fc-a216-3404-69ef-bdffa445eff6
Content-Type: application/json
{
"status": "resolved",
"resolvedReason": "fraud"
}
// 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);
mgc-beta security partner security-alerts patch --partner-security-alert-id {partnerSecurityAlert-id} --body '{\
"status": "resolved", \
"resolvedReason": "fraud"\
}\
'
// 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);
const options = {
authProvider,
};
const client = Client.init(options);
const partnerSecurityAlert = {
status: 'resolved',
resolvedReason: 'fraud'
};
await client.api('/security/partner/securityAlerts/d8b202fc-a216-3404-69ef-bdffa445eff6')
.version('beta')
.update(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();
Import-Module Microsoft.Graph.Beta.Security
$params = @{
status = "resolved"
resolvedReason = "fraud"
}
Update-MgBetaSecurityPartnerSecurityAlert -PartnerSecurityAlertId $partnerSecurityAlertId -BodyParameter $params
# 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)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "d8b202fc-a216-3404-69ef-bdffa445eff6",
"displayName": "Action Required: Virtual machine connecting to crypto currency mining pool Detected",
"description": "Analysis of Azure resource network activity detected the resource was connecting to a crypto currency mining pool. This would often be an indication that your Azure resource is compromised.",
"alertType": "networkConnectionsToCryptoMiningPools",
"status": "active",
"severity": "high",
"confidenceLevel": "medium",
"customerTenantId": "1889e718-414b-4bad-8bbe-c1135bd39a41",
"subscriptionId": "5f6e6521-6e5f-4b0b-80aa-bd44fad7a398",
"valueAddedResellerTenantId": "c296b2ce-8cd1-4346-9e82-d8eccca70d65",
"catalogOfferId": "MS-AZR-0017G",
"detectedDateTime": "2024-01-23T16:03:33.05Z",
"firstObservedDateTime": "2024-01-23T16:03:33.05Z",
"lastObservedDateTime": "2024-01-23T16:03:33.05Z",
"resolvedReason": "fraud",
"resolvedOnDateTime": "2024-02-23T16:03:33.05Z",
"resolvedBy": "danas@contoso.com",
"isTest": false,
"affectedResources": [
{
"resourceId": "/subscriptions/subscription-id/resourceGroups/resourcegroup-name/providers/Microsoft.Compute/virtualMachines/vm-name",
"resourceType": "AzureResource"
}
],
"activityLogs": [
{
"statusFrom": "active",
"statusTo": "investigating",
"updatedBy": "samanthab@contoso.com",
"updatedDateTime": "2023-08-10T08:47:10.8454142Z"
},
{
"statusFrom": "investigating",
"statusTo": "resolved",
"updatedBy": "samanthab@contoso.com",
"updatedDateTime": "2023-08-10T08:47:25.2089246Z"
}
],
"additionalDetails": {
"VM_IP": "[ \"vm-ip\"]",
"MiningPool_IP": "[ \"mining-pool-ip\"]",
"ConnectionCount": "5",
"CryptoCurrencyMiningPoolDomainName": "pool-name.com"
}
}