Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
eDiscovery.Read.All
eDiscovery.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Not supported.
Not supported.
HTTP request
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/custodians/{custodianId}/unifiedGroupSources
In the request body, supply a JSON representation of the unifiedGroupSource object.
You can specify the following properties when you create an unifiedGroupSource.
Note: Either group or group@odata.bind is required in order to create a unifiedGroupSource.
Property
Type
Description
includedSources
microsoft.graph.security.sourceType
Specifies which sources are included in this group. Possible values are: mailbox, site.
group
String
Specifies the email address for the group. To get the email address of a group, use List groups or Get group. You can then query by the name of the group using $filter; for example, https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'secret group'&$select=mail,id,displayName.
group@odata.bind
String
ID of the group. You can get this in the same way that you get the group.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Security;
using Microsoft.Graph.Models;
var requestBody = new UnifiedGroupSource
{
Group = new Group
{
Mail = "SOCTeam@contoso.com",
},
IncludedSources = SourceType.Mailbox | SourceType.Site,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].Custodians["{ediscoveryCustodian-id}"].UnifiedGroupSources.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.security.UnifiedGroupSource unifiedGroupSource = new com.microsoft.graph.models.security.UnifiedGroupSource();
Group group = new Group();
group.setMail("SOCTeam@contoso.com");
unifiedGroupSource.setGroup(group);
unifiedGroupSource.setIncludedSources(EnumSet.of(com.microsoft.graph.models.security.SourceType.Mailbox, com.microsoft.graph.models.security.SourceType.Site));
com.microsoft.graph.models.security.UnifiedGroupSource result = graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").custodians().byEdiscoveryCustodianId("{ediscoveryCustodian-id}").unifiedGroupSources().post(unifiedGroupSource);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\UnifiedGroupSource;
use Microsoft\Graph\Generated\Models\Group;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new UnifiedGroupSource();
$group = new Group();
$group->setMail('SOCTeam@contoso.com');
$requestBody->setGroup($group);
$requestBody->setIncludedSources(new SourceType('mailbox, site'));
$result = $graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->custodians()->byEdiscoveryCustodianId('ediscoveryCustodian-id')->unifiedGroupSources()->post($requestBody)->wait();
POST https://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/custodians/0053a61a3b6c42738f7606791716a22a/unifiedGroupSources
Content-Type: application/json
{
"group@odata.bind": "https://graph.microsoft.com/v1.0/groups/93f90172-fe05-43ea-83cf-ff785a40d610",
"includedSources": "mailbox"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Security;
var requestBody = new UnifiedGroupSource
{
IncludedSources = SourceType.Mailbox,
AdditionalData = new Dictionary<string, object>
{
{
"group@odata.bind" , "https://graph.microsoft.com/v1.0/groups/93f90172-fe05-43ea-83cf-ff785a40d610"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].Custodians["{ediscoveryCustodian-id}"].UnifiedGroupSources.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.security.UnifiedGroupSource unifiedGroupSource = new com.microsoft.graph.models.security.UnifiedGroupSource();
unifiedGroupSource.setIncludedSources(EnumSet.of(com.microsoft.graph.models.security.SourceType.Mailbox));
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("group@odata.bind", "https://graph.microsoft.com/v1.0/groups/93f90172-fe05-43ea-83cf-ff785a40d610");
unifiedGroupSource.setAdditionalData(additionalData);
com.microsoft.graph.models.security.UnifiedGroupSource result = graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").custodians().byEdiscoveryCustodianId("{ediscoveryCustodian-id}").unifiedGroupSources().post(unifiedGroupSource);
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.