Namespace: microsoft.graph.security
Create a new ediscoveryReviewSetQuery object.
This API is available in the following national cloud deployments.
| Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
| ✅ |
✅ |
✅ |
❌ |
Permissions
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 |
eDiscovery.Read.All |
eDiscovery.ReadWrite.All |
Important
For delegated access using work or school accounts, the signed-in user must be assigned a supported Microsoft Purview role through one of the following options:
- eDiscovery Manager. Allows members to access review sets in eDiscovery cases they create and are members of. This is the least privileged option for accessing review sets in their own cases.
- eDiscovery Administrator. Provides all the permissions of eDiscovery Manager, plus the ability to access review sets in all eDiscovery cases in the organization.
- Reviewer. Provides read-only access to review sets within eDiscovery cases where the user is a member. Reviewers can view and tag documents but cannot perform other case management tasks.
The Review role allows users to access review sets in eDiscovery cases they are members of. Users can view and tag documents in review sets but cannot preview search results or perform other search or case management tasks.
For more information about eDiscovery permissions and roles, see Assign permissions in eDiscovery.
HTTP request
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/reviewSets/{ediscoveryReviewSetId}/queries
Request body
In the request body, supply a JSON representation of the ediscoveryReviewSetQuery object.
You can specify the following properties when you create an ediscoveryReviewSetQuery.
Response
If successful, this method returns a 201 Created response code and an microsoft.graph.security.ediscoveryReviewSetQuery object in the response body.
Examples
Request
The following example shows a request.
POST https://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/58399dff-cebe-478f-b1af-d3227f1fd645/reviewSets/273f11a1-17aa-419c-981d-ff10d33e420f/queries
Content-Type: application/json
{
"displayName": "My Query 1",
"contentQuery": "(Author=\"edison\")"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Security;
var requestBody = new EdiscoveryReviewSetQuery
{
DisplayName = "My Query 1",
ContentQuery = "(Author=\"edison\")",
};
// To initialize your graphClient, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].ReviewSets["{ediscoveryReviewSet-id}"].Queries.PostAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelssecurity "github.com/microsoftgraph/msgraph-sdk-go/models/security"
//other-imports
)
requestBody := graphmodelssecurity.NewEdiscoveryReviewSetQuery()
displayName := "My Query 1"
requestBody.SetDisplayName(&displayName)
contentQuery := "(Author=\"edison\")"
requestBody.SetContentQuery(&contentQuery)
// To initialize your graphClient, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=go
queries, err := graphClient.Security().Cases().EdiscoveryCases().ByEdiscoveryCaseId("ediscoveryCase-id").ReviewSets().ByEdiscoveryReviewSetId("ediscoveryReviewSet-id").Queries().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.security.EdiscoveryReviewSetQuery ediscoveryReviewSetQuery = new com.microsoft.graph.models.security.EdiscoveryReviewSetQuery();
ediscoveryReviewSetQuery.setDisplayName("My Query 1");
ediscoveryReviewSetQuery.setContentQuery("(Author=\"edison\")");
com.microsoft.graph.models.security.EdiscoveryReviewSetQuery result = graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").reviewSets().byEdiscoveryReviewSetId("{ediscoveryReviewSet-id}").queries().post(ediscoveryReviewSetQuery);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const ediscoveryReviewSetQuery = {
displayName: 'My Query 1',
contentQuery: '(Author=\"edison\")'
};
await client.api('/security/cases/ediscoveryCases/58399dff-cebe-478f-b1af-d3227f1fd645/reviewSets/273f11a1-17aa-419c-981d-ff10d33e420f/queries')
.post(ediscoveryReviewSetQuery);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Security\EdiscoveryReviewSetQuery;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EdiscoveryReviewSetQuery();
$requestBody->setDisplayName('My Query 1');
$requestBody->setContentQuery('(Author=\"edison\")');
$result = $graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->reviewSets()->byEdiscoveryReviewSetId('ediscoveryReviewSet-id')->queries()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Security
$params = @{
displayName = "My Query 1"
contentQuery = "(Author="edison")"
}
New-MgSecurityCaseEdiscoveryCaseReviewSetQuery -EdiscoveryCaseId $ediscoveryCaseId -EdiscoveryReviewSetId $ediscoveryReviewSetId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.security.ediscovery_review_set_query import EdiscoveryReviewSetQuery
# To initialize your graph_client, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EdiscoveryReviewSetQuery(
display_name = "My Query 1",
content_query = "(Author=\"edison\")",
)
result = await graph_client.security.cases.ediscovery_cases.by_ediscovery_case_id('ediscoveryCase-id').review_sets.by_ediscovery_review_set_id('ediscoveryReviewSet-id').queries.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
The following example shows the response.
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/v1.0/$metadata#security/cases/ediscoveryCases('58399dff-cebe-478f-b1af-d3227f1fd645')/reviewSets('273f11a1-17aa-419c-981d-ff10d33e420f')/queries/$entity",
"description": null,
"lastModifiedDateTime": "2022-05-29T23:39:51.3307953Z",
"contentQuery": "((Author=\"edison\"))",
"id": "fcb86cd1-50e0-427c-840e-ba6f087364e5",
"displayName": "My Query 1",
"createdDateTime": "2022-05-29T23:39:51.3307953Z",
"createdBy": {
"application": null,
"user": {
"id": "c25c3914-f9f7-43ee-9cba-a25377e0cec6",
"displayName": null,
"userPrincipalName": "c25c3914-f9f7-43ee-9cba-a25377e0cec6"
}
},
"lastModifiedBy": {
"application": null,
"user": {
"id": "c25c3914-f9f7-43ee-9cba-a25377e0cec6",
"displayName": null,
"userPrincipalName": "c25c3914-f9f7-43ee-9cba-a25377e0cec6"
}
}
}