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 review all accessReviewInstanceDecisionItem objects in batches by using principalId, resourceId, or neither.
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)
AccessReview.ReadWrite.All
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
AccessReview.ReadWrite.All
Not available.
Important
In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation.
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 /me/pendingAccessReviewInstances/{accessReviewInstanceId}/batchRecordDecisions
In the request body, supply JSON representation of the parameters.
The following table shows the parameters that can be used with this action.
Parameter
Type
Description
decision
String
Access decision for the entity being reviewed. Possible values are: Approve, Deny, NotReviewed, DontKnow. Required.
justification
String
Context of the review provided to admins. Required if justificationRequiredOnApproval is True on the accessReviewScheduleDefinition.
principalId
String
If supplied, all the accessReviewInstanceDecisionItems with matching principalId will be reviewed in this batch. If not supplied, all principalIds will be reviewed.
resourceId
String
If supplied, all the accessReviewInstanceDecisionItems with matching resourceId will be reviewed in this batch. If not supplied, all resourceIds will be reviewed.
Response
If successful, this action returns a 204 No Content response code.
POST https://graph.microsoft.com/beta/me/pendingAccessReviewInstances/{accessReviewInstanceId}/batchRecordDecisions
Content-Type: application/json
{
"decision": "Approve",
"justification": "All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team",
"resourceId": "a5c51e59-3fcd-4a37-87a1-835c0c21488a"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.BatchRecordDecisions;
var requestBody = new BatchRecordDecisionsPostRequestBody
{
Decision = "Approve",
Justification = "All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team",
ResourceId = "a5c51e59-3fcd-4a37-87a1-835c0c21488a",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Me.PendingAccessReviewInstances["{accessReviewInstance-id}"].BatchRecordDecisions.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
mgc-beta users pending-access-review-instances batch-record-decisions post --user-id {user-id} --access-review-instance-id {accessReviewInstance-id} --body '{\
"decision": "Approve",\
"justification": "All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team",\
"resourceId": "a5c51e59-3fcd-4a37-87a1-835c0c21488a"\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// 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"
graphusers "github.com/microsoftgraph/msgraph-beta-sdk-go/users"
//other-imports
)
requestBody := graphusers.NewItemBatchRecordDecisionsPostRequestBody()
decision := "Approve"
requestBody.SetDecision(&decision)
justification := "All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team"
requestBody.SetJustification(&justification)
resourceId := "a5c51e59-3fcd-4a37-87a1-835c0c21488a"
requestBody.SetResourceId(&resourceId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().PendingAccessReviewInstances().ByAccessReviewInstanceId("accessReviewInstance-id").BatchRecordDecisions().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.users.item.pendingaccessreviewinstances.item.batchrecorddecisions.BatchRecordDecisionsPostRequestBody batchRecordDecisionsPostRequestBody = new com.microsoft.graph.beta.users.item.pendingaccessreviewinstances.item.batchrecorddecisions.BatchRecordDecisionsPostRequestBody();
batchRecordDecisionsPostRequestBody.setDecision("Approve");
batchRecordDecisionsPostRequestBody.setJustification("All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team");
batchRecordDecisionsPostRequestBody.setResourceId("a5c51e59-3fcd-4a37-87a1-835c0c21488a");
graphClient.me().pendingAccessReviewInstances().byAccessReviewInstanceId("{accessReviewInstance-id}").batchRecordDecisions().post(batchRecordDecisionsPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
const options = {
authProvider,
};
const client = Client.init(options);
const batchRecordDecisions = {
decision: 'Approve',
justification: 'All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team',
resourceId: 'a5c51e59-3fcd-4a37-87a1-835c0c21488a'
};
await client.api('/me/pendingAccessReviewInstances/{accessReviewInstanceId}/batchRecordDecisions')
.version('beta')
.post(batchRecordDecisions);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Users\Item\PendingAccessReviewInstances\Item\BatchRecordDecisions\BatchRecordDecisionsPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BatchRecordDecisionsPostRequestBody();
$requestBody->setDecision('Approve');
$requestBody->setJustification('All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team');
$requestBody->setResourceId('a5c51e59-3fcd-4a37-87a1-835c0c21488a');
$graphServiceClient->me()->pendingAccessReviewInstances()->byAccessReviewInstanceId('accessReviewInstance-id')->batchRecordDecisions()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Import-Module Microsoft.Graph.Beta.Users.Actions
$params = @{
decision = "Approve"
justification = "All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team"
resourceId = "a5c51e59-3fcd-4a37-87a1-835c0c21488a"
}
# A UPN can also be used as -UserId.
Invoke-MgBetaBatchUserPendingAccessReviewInstanceRecordDecision -UserId $userId -AccessReviewInstanceId $accessReviewInstanceId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.users.item.pendingaccessreviewinstances.item.batch_record_decisions.batch_record_decisions_post_request_body import BatchRecordDecisionsPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BatchRecordDecisionsPostRequestBody(
decision = "Approve",
justification = "All principals with access need continued access to the resource (Marketing Group) as all the principals are on the marketing team",
resource_id = "a5c51e59-3fcd-4a37-87a1-835c0c21488a",
)
await graph_client.me.pending_access_review_instances.by_access_review_instance_id('accessReviewInstance-id').batch_record_decisions.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.