名前空間: microsoft.graph.security
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
指定したセンサーを統合セキュリティ ポータルに移行します。 このアクションにより、1 つ以上の Microsoft Defender for Identity センサーの移行プロセスが開始されます。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
SecurityIdentitiesMigration.ReadWrite.All |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
SecurityIdentitiesMigration.ReadWrite.All |
注意事項なし。 |
重要
職場または学校アカウントを使用して委任されたアクセスの場合、サインインしたユーザーには、セキュリティ管理者ロールMicrosoft Entraまたは Microsoft Defender XDR 統合 Role-Based Access Control (RBAC) によって作成されたサポートされているアクセス許可を持つカスタム ロールが割り当てられている必要があります。
HTTP 要求
POST /security/identities/sensorMigration/migrate
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、パラメーターの JSON 表現を指定します。
次の表に、このアクションで使用できるパラメーターを示します。
| パラメーター |
型 |
説明 |
| sensorIds |
String collection |
移行するセンサー ID のコレクション。 |
応答
成功した場合、このアクションは応答本文で 200 OK 応答コードと migrateSensorsResult オブジェクトを返します。
例
要求
次の例は要求を示しています。
POST https://graph.microsoft.com/beta/security/identities/sensorMigration/migrate
Content-Type: application/json
{
"sensorIds": [
"fdce0c43-15e8-e322-7656-aff297505af5",
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Security.Identities.SensorMigration.MicrosoftGraphSecurityMigrate;
var requestBody = new MigratePostRequestBody
{
SensorIds = new List<string>
{
"fdce0c43-15e8-e322-7656-aff297505af5",
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Identities.SensorMigration.MicrosoftGraphSecurityMigrate.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"
//other-imports
)
requestBody := graphsecurity.NewMigratePostRequestBody()
sensorIds := []string {
"fdce0c43-15e8-e322-7656-aff297505af5",
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
}
requestBody.SetSensorIds(sensorIds)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
microsoftGraphSecurityMigrate, err := graphClient.Security().Identities().SensorMigration().MicrosoftGraphSecurityMigrate().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.identities.sensormigration.microsoftgraphsecuritymigrate.MigratePostRequestBody migratePostRequestBody = new com.microsoft.graph.beta.security.identities.sensormigration.microsoftgraphsecuritymigrate.MigratePostRequestBody();
LinkedList<String> sensorIds = new LinkedList<String>();
sensorIds.add("fdce0c43-15e8-e322-7656-aff297505af5");
sensorIds.add("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
migratePostRequestBody.setSensorIds(sensorIds);
var result = graphClient.security().identities().sensorMigration().microsoftGraphSecurityMigrate().post(migratePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const migrateSensorsResult = {
sensorIds: [
'fdce0c43-15e8-e322-7656-aff297505af5',
'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
]
};
await client.api('/security/identities/sensorMigration/migrate')
.version('beta')
.post(migrateSensorsResult);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Security\Identities\SensorMigration\MicrosoftGraphSecurityMigrate\MigratePostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MigratePostRequestBody();
$requestBody->setSensorIds(['fdce0c43-15e8-e322-7656-aff297505af5', 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', ]);
$result = $graphServiceClient->security()->identities()->sensorMigration()->microsoftGraphSecurityMigrate()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Security
$params = @{
sensorIds = @(
"fdce0c43-15e8-e322-7656-aff297505af5"
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
}
Move-MgBetaSecurityIdentitySensorMigration -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.security.identities.sensormigration.microsoft_graph_security_migrate.migrate_post_request_body import MigratePostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MigratePostRequestBody(
sensor_ids = [
"fdce0c43-15e8-e322-7656-aff297505af5",
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
],
)
result = await graph_client.security.identities.sensor_migration.microsoft_graph_security_migrate.post(request_body)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.security.migrateSensorsResult",
"successfulMigrationSensorIds": [
"fdce0c43-15e8-e322-7656-aff297505af5"
],
"failedMigrationSensorIds": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}