为此 API 选择标记为最低特权的权限。 只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
权限类型
最低特权权限
更高特权权限
委派(工作或学校帐户)
eDiscovery.Read.All
eDiscovery.ReadWrite.All
委派(个人 Microsoft 帐户)
不支持。
不支持。
应用程序
不支持。
不支持。
HTTP 请求
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/custodians/applyHold
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/custodians/{eDiscoveryCustodianId}/applyHold
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityApplyHold;
var requestBody = new ApplyHoldPostRequestBody
{
Ids = new List<string>
{
"7f697316-43ed-48e1-977f-261be050db93",
"b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].Custodians.MicrosoftGraphSecurityApplyHold.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc security cases ediscovery-cases custodians microsoft-graph-security-apply-hold post --ediscovery-case-id {ediscoveryCase-id} --body '{\
"ids": [\
"7f697316-43ed-48e1-977f-261be050db93", "b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8"\
]\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.security.cases.ediscoverycases.item.custodians.microsoftgraphsecurityapplyhold.ApplyHoldPostRequestBody applyHoldPostRequestBody = new com.microsoft.graph.security.cases.ediscoverycases.item.custodians.microsoftgraphsecurityapplyhold.ApplyHoldPostRequestBody();
LinkedList<String> ids = new LinkedList<String>();
ids.add("7f697316-43ed-48e1-977f-261be050db93");
ids.add("b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8");
applyHoldPostRequestBody.setIds(ids);
graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").custodians().microsoftGraphSecurityApplyHold().post(applyHoldPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ApplyHoldPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ApplyHoldPostRequestBody();
$requestBody->setIds(['7f697316-43ed-48e1-977f-261be050db93', 'b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8', ]);
$graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->custodians()->microsoftGraphSecurityApplyHold()->post($requestBody)->wait();
POST https://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/custodians/c25c3914f9f743ee9cbaa25377e0cec6/applyHold
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].Custodians["{ediscoveryCustodian-id}"].MicrosoftGraphSecurityApplyHold.PostAsync();
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc security cases ediscovery-cases custodians microsoft-graph-security-apply-hold-by-id post --ediscovery-case-id {ediscoveryCase-id} --ediscovery-custodian-id {ediscoveryCustodian-id}
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").custodians().byEdiscoveryCustodianId("{ediscoveryCustodian-id}").microsoftGraphSecurityApplyHold().post();
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->custodians()->byEdiscoveryCustodianId('ediscoveryCustodian-id')->microsoftGraphSecurityApplyHold()->post()->wait();