Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Permet aux réviseurs d’examiner tous les objets accessReviewInstanceDecisionItem dans des lots à l’aide de principalId, resourceId ou aucun des deux.
Dans le corps de la demande, fournissez une représentation JSON des paramètres.
Le tableau suivant indique les paramètres utilisables avec cette action.
Paramètre
Type
Description
Décision
Chaîne
Décision d’accès pour l’entité en cours de révision. Les valeurs possibles sont les suivantes : Approve, Deny, NotReviewed, DontKnow. Obligatoire.
Justification
Chaîne
Contexte de la révision fournie aux administrateurs. Obligatoire si justificationRequiredOnApproval se trouve True sur accessReviewScheduleDefinition.
principalId
Chaîne
S’il est fourni, tous les accessReviewInstanceDecisionItems avec principalId correspondant seront examinés dans ce lot. S’il n’est pas fourni, tous les principalIds sont examinés .
resourceId
String
S’il est fourni, tous les accessReviewInstanceDecisionItems avec resourceId correspondant seront examinés dans ce lot. S’il n’est pas fourni, tous les resourceIds sont examinés .
Réponse
Si elle réussit, cette action renvoie un code de réponse 204 No Content.
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);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
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"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphusers "github.com/microsoftgraph/msgraph-beta-sdk-go/users"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
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)
graphClient.Me().PendingAccessReviewInstances().ByAccessReviewInstanceId("accessReviewInstance-id").BatchRecordDecisions().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.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);
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);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\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();
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
from msgraph import GraphServiceClient
from msgraph.generated.users.item.pendingaccessreviewinstances.item.batch_record_decisions.batch_record_decisions_post_request_body import BatchRecordDecisionsPostRequestBody
graph_client = GraphServiceClient(credentials, scopes)
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)
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez https://aka.ms/ContentUserFeedback.