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 .
Dans le corps de la demande, fournissez une représentation JSON de l’objet sourceCollection .
Le tableau suivant répertorie les propriétés qui sont requises lorsque vous créez la collection sourceCollection.
Propriété
Type
Description
dataSourceScopes
microsoft.graph.ediscovery.dataSourceScopes
Quand elle est spécifiée, la collection s’étend sur un service pour une charge de travail entière. Les valeurs possibles sont , none,allTenantSitesallTenantMailboxes ,allCaseCustodians , .allCaseNoncustodialDataSourcesNote: Un seul consignataire ou la spécification de dataSourceScope est nécessaire lors de la création d’une collection source.
Sources dépositaires à inclure dans cette recherche. Vous pouvez obtenir l’URL à partir de consignataire siteSources, unifiedGroupSources ou userSources , ainsi que l’ID de la source.
Note: Un consignataire ou une source de locataire est nécessaire lors de la création d’une collection source.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Ediscovery;
var requestBody = new SourceCollection
{
DisplayName = "Quarterly Financials search",
ContentQuery = "subject:'Quarterly Financials'",
AdditionalData = new Dictionary<string, object>
{
{
"custodianSources@odata.bind" , new List<string>
{
"https://graph.microsoft.com/beta/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources/46384443-4137-3032-3437-363939433735",
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Compliance.Ediscovery.Cases["{case-id}"].SourceCollections.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"
graphmodelsediscovery "github.com/microsoftgraph/msgraph-beta-sdk-go/models/ediscovery"
//other-imports
)
requestBody := graphmodelsediscovery.NewSourceCollection()
displayName := "Quarterly Financials search"
requestBody.SetDisplayName(&displayName)
contentQuery := "subject:'Quarterly Financials'"
requestBody.SetContentQuery(&contentQuery)
additionalData := map[string]interface{}{
odataBind := []string {
"https://graph.microsoft.com/beta/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources/46384443-4137-3032-3437-363939433735",
}
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
sourceCollections, err := graphClient.Compliance().Ediscovery().Cases().ByCaseId("case-id").SourceCollections().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.models.ediscovery.SourceCollection sourceCollection = new com.microsoft.graph.beta.models.ediscovery.SourceCollection();
sourceCollection.setDisplayName("Quarterly Financials search");
sourceCollection.setContentQuery("subject:'Quarterly Financials'");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<String> custodianSourcesOdataBind = new LinkedList<String>();
custodianSourcesOdataBind.add("https://graph.microsoft.com/beta/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources/46384443-4137-3032-3437-363939433735");
additionalData.put("custodianSources@odata.bind", custodianSourcesOdataBind);
sourceCollection.setAdditionalData(additionalData);
com.microsoft.graph.models.ediscovery.SourceCollection result = graphClient.compliance().ediscovery().cases().byCaseId("{case-id}").sourceCollections().post(sourceCollection);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.ediscovery.source_collection import SourceCollection
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SourceCollection(
display_name = "Quarterly Financials search",
content_query = "subject:'Quarterly Financials'",
additional_data = {
"custodian_sources@odata_bind" : [
"https://graph.microsoft.com/beta/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources/46384443-4137-3032-3437-363939433735",
],
}
)
result = await graph_client.compliance.ediscovery.cases.by_case_id('case-id').source_collections.post(request_body)