Espace de noms : microsoft.graph.security
Importante
Les API sous la version /beta
dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Déclencher un indexOperation
Cette API est disponible dans les déploiements de cloud national suivants.
Service global |
Gouvernement des États-Unis L4 |
Us Government L5 (DOD) |
Chine gérée par 21Vianet |
✅ |
✅ |
✅ |
❌ |
Autorisations
Choisissez l’autorisation ou les autorisations marquées comme moins privilégiées pour cette API. Utilisez une autorisation ou des autorisations privilégiées plus élevées uniquement si votre application en a besoin. Pour plus d’informations sur les autorisations déléguées et d’application, consultez Types d’autorisations. Pour en savoir plus sur ces autorisations, consultez les informations de référence sur les autorisations.
Type d’autorisation |
Autorisations avec privilèges minimum |
Autorisations privilégiées plus élevées |
Déléguée (compte professionnel ou scolaire) |
eDiscovery.Read.All |
eDiscovery.ReadWrite.All |
Déléguée (compte Microsoft personnel) |
Non prise en charge. |
Non prise en charge. |
Application |
eDiscovery.Read.All |
eDiscovery.ReadWrite.All |
Requête HTTP
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/custodians/updateIndex
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/custodians/{ediscoveryCustodianId}/updateIndex
Corps de la demande
Dans le corps de la demande, fournissez une représentation JSON des paramètres.
Le tableau suivant indique les paramètres utilisables avec cette action.
Paramètre |
Type |
Description |
Ids |
String collection |
ID des consignataires à indexer. Optional. Le nombre maximal d’ID pouvant être fournis est de 1 000. |
Réponse
Si elle réussit, cette action renvoie un code de réponse 202 Accepté.
Exemples
Exemple 1 : Consignataires d’index en bloc
Demande
L’exemple suivant illustre la demande.
POST https://graph.microsoft.com/beta/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/custodians/updateindex
Content-Type: application/json
{
"ids": [
"7f697316-43ed-48e1-977f-261be050db93", "b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8"
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityUpdateIndex;
var requestBody = new UpdateIndexPostRequestBody
{
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.MicrosoftGraphSecurityUpdateIndex.PostAsync(requestBody);
mgc-beta security cases ediscovery-cases custodians microsoft-graph-security-update-index 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 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.NewUpdateIndexPostRequestBody()
ids := []string {
"7f697316-43ed-48e1-977f-261be050db93",
"b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8",
}
requestBody.SetIds(ids)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Security().Cases().EdiscoveryCases().ByEdiscoveryCaseId("ediscoveryCase-id").Custodians().MicrosoftGraphSecurityUpdateIndex().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.cases.ediscoverycases.item.custodians.microsoftgraphsecurityupdateindex.UpdateIndexPostRequestBody updateIndexPostRequestBody = new com.microsoft.graph.beta.security.cases.ediscoverycases.item.custodians.microsoftgraphsecurityupdateindex.UpdateIndexPostRequestBody();
LinkedList<String> ids = new LinkedList<String>();
ids.add("7f697316-43ed-48e1-977f-261be050db93");
ids.add("b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8");
updateIndexPostRequestBody.setIds(ids);
graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").custodians().microsoftGraphSecurityUpdateIndex().post(updateIndexPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const updateindex = {
ids: [
'7f697316-43ed-48e1-977f-261be050db93', 'b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8'
]
};
await client.api('/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/custodians/updateindex')
.version('beta')
.post(updateindex);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Security\Cases\EdiscoveryCases\Item\Custodians\MicrosoftGraphSecurityUpdateIndex\UpdateIndexPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new UpdateIndexPostRequestBody();
$requestBody->setIds(['7f697316-43ed-48e1-977f-261be050db93', 'b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8', ]);
$graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->custodians()->microsoftGraphSecurityUpdateIndex()->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.cases.ediscoverycases.item.custodians.microsoft_graph_security_update_index.update_index_post_request_body import UpdateIndexPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = UpdateIndexPostRequestBody(
ids = [
"7f697316-43ed-48e1-977f-261be050db93",
"b26888b3-e1f5-47c5-bdf2-33d1b90cb2e8",
],
)
await graph_client.security.cases.ediscovery_cases.by_ediscovery_case_id('ediscoveryCase-id').custodians.microsoft_graph_security_update_index.post(request_body)
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 202 Accepted
Exemple 2 : Index unique consignataire
Demande
L’exemple suivant illustre la demande.
POST https://graph.microsoft.com/beta/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/custodians/c25c3914f9f743ee9cbaa25377e0cec6/updateIndex
// 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}"].MicrosoftGraphSecurityUpdateIndex.PostAsync();
mgc-beta security cases ediscovery-cases custodians microsoft-graph-security-update-index-by-id post --ediscovery-case-id {ediscoveryCase-id} --ediscovery-custodian-id {ediscoveryCustodian-id}
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Security().Cases().EdiscoveryCases().ByEdiscoveryCaseId("ediscoveryCase-id").Custodians().ByEdiscoveryCustodianId("ediscoveryCustodian-id").MicrosoftGraphSecurityUpdateIndex().Post(context.Background(), nil)
// 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}").microsoftGraphSecurityUpdateIndex().post();
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/custodians/c25c3914f9f743ee9cbaa25377e0cec6/updateIndex')
.version('beta')
.post();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->custodians()->byEdiscoveryCustodianId('ediscoveryCustodian-id')->microsoftGraphSecurityUpdateIndex()->post()->wait();
Import-Module Microsoft.Graph.Beta.Security
Update-MgBetaSecurityCaseEdiscoveryCaseCustodianIndex -EdiscoveryCaseId $ediscoveryCaseId -EdiscoveryCustodianId $ediscoveryCustodianId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.security.cases.ediscovery_cases.by_ediscovery_case_id('ediscoveryCase-id').custodians.by_ediscovery_custodian_id('ediscoveryCustodian-id').microsoft_graph_security_update_index.post()
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 202 Accepted