| title | Create noncustodialDataSource |
|---|---|
| description | Create a new noncustodialDataSource object. |
| author | mahage-msft |
| ms.localizationpriority | medium |
| ms.subservice | ediscovery |
| doc_type | apiPageType |
| ms.date | 06/10/2024 |
Namespace: microsoft.graph.ediscovery
[!INCLUDE beta-disclaimer]
[!INCLUDE ediscovery-deprecation]
Create a new noncustodialDataSource object.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
POST /compliance/ediscovery/cases/{caseId}/noncustodialDataSources| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the noncustodialDataSource object.
The following table lists the properties that are required when you create the noncustodialDataSource.
| Property | Type | Description |
|---|---|---|
| applyHoldToSource | Boolean | Indicates if hold is applied to noncustodial data source (such as mailbox or site). |
| datasource | microsoft.graph.ediscovery.dataSource | Either a userSource or siteSource. For userSource, use "dataSource" : { "@odata.type": "microsoft.graph.ediscovery.userSource", "email": "SMTP address"}. For site source use "dataSource": { "@odata.type": "microsoft.graph.ediscovery.siteSource", "site@odata.bind" : "siteId" }, where siteId can be derived from the site URL, for example, https://contoso.sharepoint.com/sites/HumanResources, the Microsoft Graph request would be https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/HumanResources. The ID is the first GUID listed in the ID field. |
If successful, this method returns a 201 Created response code and a noncustodialDataSource object in the response body.
POST https://graph.microsoft.com/beta/compliance/ediscovery/cases/5b840b94-f821-4c4a-8cad-3a90062bf51a/noncustodialDataSources
Content-Type: application/json
{
"applyHoldToSource" : true,
"dataSource" : {
"@odata.type" : "microsoft.graph.ediscovery.userSource",
"email" : "adelev@contoso.com"
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#compliance/ediscovery/cases('5b840b94-f821-4c4a-8cad-3a90062bf51a')/noncustodialDataSources/$entity",
"status": "0",
"lastModifiedDateTime": "2021-02-19T07:02:45.7732516Z",
"releasedDateTime": "0001-01-01T00:00:00Z",
"id": "39374346363831303741353341373443",
"displayName": null,
"createdDateTime": "2021-02-19T07:02:45.4863718Z",
"applyHoldToSource": true
}POST https://graph.microsoft.com/beta/compliance/ediscovery/cases/15d80234-8320-4f10-96d0-d98d53ffdfc9/noncustodialdatasources
Content-Type: application/json
{
"applyHoldToSource": false,
"dataSource": {
"@odata.type": "microsoft.graph.ediscovery.siteSource",
"site": {
"webUrl": "https://contoso.sharepoint.com/sites/SecretSite"
}
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#compliance/ediscovery/cases('15d80234-8320-4f10-96d0-d98d53ffdfc9')/noncustodialDataSources/$entity",
"status": "Active",
"lastModifiedDateTime": "2021-08-11T22:43:45.1079425Z",
"releasedDateTime": "0001-01-01T00:00:00Z",
"id": "35393843394546413031353146334134",
"displayName": "Secret Site",
"createdDateTime": "2021-08-11T22:43:45.0189955Z",
"applyHoldToSource": false
}