Namespace: microsoft.graph
Important
APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Enables reviewers to set the applyResult and applyDescription on all accessReviewInstanceDecisionItem objects in batches by using customDataProvidedResourceId.
NOTE: The access review instance must be in an Applying state.
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 permission |
Higher privileged permissions |
| Delegated (work or school account) |
AccessReview.ReadWrite.All |
Not available. |
| Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
| Application |
AccessReview.ReadWrite.All |
Not available. |
Important
For delegated access using work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that grants the permissions required for this operation. This operation supports the following built-in roles, which provide only the least privilege necessary:
- To write access reviews of a group or app: User Administrator, Identity Governance Administrator
- To write access reviews of a Microsoft Entra role: Identity Governance Administrator, Privileged Role Administrator
HTTP request
POST /identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinitionId}/instances/{accessReviewInstanceId}/batchApplyCustomDataProvidedResourceDecisions
| Name |
Description |
| Authorization |
Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type |
application/json. Required. |
| x-accessreviews-version |
vNext. Required. |
Request body
In the request body, supply a JSON representation of the parameters.
The following table lists the parameters when you call this action.
| Parameter |
Type |
Description |
| applyResult |
accessReviewInstanceDecisionItemApplyResult |
The applyResult for the entity being reviewed. The possible values are: new, appliedSuccessfully, appliedWithUnknownFailure, appliedSuccessfullyButObjectNotFound, applyNotSupported. Required. |
| applyDescription |
String |
If supplied, a description for the applyResult. Optional. |
| customDataProvidedResourceId |
String |
The applyResult will be set on all accessReviewInstanceDecisionItems whose custom data provided resource id matches the supplied customDataProvidedResourceId. Required. |
Response
If successful, this action returns a 202 Accepted response code.
Examples
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinitionId}/instances/{accessReviewInstanceId}/batchApplyCustomDataProvidedResourceDecisions
Content-Type: application/json
{
"applyResult": "appliedSuccessfully",
"applyDescription": "Access was removed from production application: GitHub-app.",
"customDataProvidedResourceId": "5c728447-be5c-4565-b4d3-cb248b609891"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.BatchApplyCustomDataProvidedResourceDecisions;
using Microsoft.Graph.Beta.Models;
var requestBody = new BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody
{
ApplyResult = AccessReviewInstanceDecisionItemApplyResult.AppliedSuccessfully,
ApplyDescription = "Access was removed from production application: GitHub-app.",
CustomDataProvidedResourceId = "5c728447-be5c-4565-b4d3-cb248b609891",
};
// To initialize your graphClient, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityGovernance.AccessReviews.Definitions["{accessReviewScheduleDefinition-id}"].Instances["{accessReviewInstance-id}"].BatchApplyCustomDataProvidedResourceDecisions.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"
graphidentitygovernance "github.com/microsoftgraph/msgraph-beta-sdk-go/identitygovernance"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphidentitygovernance.NewBatchApplyCustomDataProvidedResourceDecisionsPostRequestBody()
applyResult := graphmodels.APPLIEDSUCCESSFULLY_ACCESSREVIEWINSTANCEDECISIONITEMAPPLYRESULT
requestBody.SetApplyResult(&applyResult)
applyDescription := "Access was removed from production application: GitHub-app."
requestBody.SetApplyDescription(&applyDescription)
customDataProvidedResourceId := "5c728447-be5c-4565-b4d3-cb248b609891"
requestBody.SetCustomDataProvidedResourceId(&customDataProvidedResourceId)
// To initialize your graphClient, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.IdentityGovernance().AccessReviews().Definitions().ByAccessReviewScheduleDefinitionId("accessReviewScheduleDefinition-id").Instances().ByAccessReviewInstanceId("accessReviewInstance-id").BatchApplyCustomDataProvidedResourceDecisions().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.identitygovernance.accessreviews.definitions.item.instances.item.batchapplycustomdataprovidedresourcedecisions.BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody batchApplyCustomDataProvidedResourceDecisionsPostRequestBody = new com.microsoft.graph.beta.identitygovernance.accessreviews.definitions.item.instances.item.batchapplycustomdataprovidedresourcedecisions.BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody();
batchApplyCustomDataProvidedResourceDecisionsPostRequestBody.setApplyResult(AccessReviewInstanceDecisionItemApplyResult.AppliedSuccessfully);
batchApplyCustomDataProvidedResourceDecisionsPostRequestBody.setApplyDescription("Access was removed from production application: GitHub-app.");
batchApplyCustomDataProvidedResourceDecisionsPostRequestBody.setCustomDataProvidedResourceId("5c728447-be5c-4565-b4d3-cb248b609891");
graphClient.identityGovernance().accessReviews().definitions().byAccessReviewScheduleDefinitionId("{accessReviewScheduleDefinition-id}").instances().byAccessReviewInstanceId("{accessReviewInstance-id}").batchApplyCustomDataProvidedResourceDecisions().post(batchApplyCustomDataProvidedResourceDecisionsPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const batchApplyCustomDataProvidedResourceDecisions = {
applyResult: 'appliedSuccessfully',
applyDescription: 'Access was removed from production application: GitHub-app.',
customDataProvidedResourceId: '5c728447-be5c-4565-b4d3-cb248b609891'
};
await client.api('/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinitionId}/instances/{accessReviewInstanceId}/batchApplyCustomDataProvidedResourceDecisions')
.version('beta')
.post(batchApplyCustomDataProvidedResourceDecisions);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\IdentityGovernance\AccessReviews\Definitions\Item\Instances\Item\BatchApplyCustomDataProvidedResourceDecisions\BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\AccessReviewInstanceDecisionItemApplyResult;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody();
$requestBody->setApplyResult(new AccessReviewInstanceDecisionItemApplyResult('appliedSuccessfully'));
$requestBody->setApplyDescription('Access was removed from production application: GitHub-app.');
$requestBody->setCustomDataProvidedResourceId('5c728447-be5c-4565-b4d3-cb248b609891');
$graphServiceClient->identityGovernance()->accessReviews()->definitions()->byAccessReviewScheduleDefinitionId('accessReviewScheduleDefinition-id')->instances()->byAccessReviewInstanceId('accessReviewInstance-id')->batchApplyCustomDataProvidedResourceDecisions()->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.identitygovernance.accessreviews.definitions.item.instances.item.batch_apply_custom_data_provided_resource_decisions.batch_apply_custom_data_provided_resource_decisions_post_request_body import BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody
from msgraph_beta.generated.models.access_review_instance_decision_item_apply_result import AccessReviewInstanceDecisionItemApplyResult
# To initialize your graph_client, see https://dotnet.territoriali.olinfo.it/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BatchApplyCustomDataProvidedResourceDecisionsPostRequestBody(
apply_result = AccessReviewInstanceDecisionItemApplyResult.AppliedSuccessfully,
apply_description = "Access was removed from production application: GitHub-app.",
custom_data_provided_resource_id = "5c728447-be5c-4565-b4d3-cb248b609891",
)
await graph_client.identity_governance.access_reviews.definitions.by_access_review_schedule_definition_id('accessReviewScheduleDefinition-id').instances.by_access_review_instance_id('accessReviewInstance-id').batch_apply_custom_data_provided_resource_decisions.post(request_body)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 202 Accepted