En la tabla siguiente se muestran las propiedades necesarias para este método.
Propiedad
Tipo
Descripción
reviewResult
Cadena
Decisión del aprobador. Los valores posibles son Approve y Deny. Obligatorio.
Justificación
Cadena
Justificación relacionada con la decisión del aprobador.
Respuesta
Si se ejecuta correctamente, este método devuelve un 204 No Content código de respuesta en el cuerpo de la respuesta. Si el autor de la llamada no tiene los permisos adecuados, el método devuelve un 403 Forbidden código de respuesta o, si no se encuentra el identificador de aprobación, el método devuelve 404 Not found. Si otro aprobador ya ha aprobado la solicitud en la misma fase de aprobación, el método devuelve 409 Conflict el código de respuesta.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ApprovalStage
{
ReviewResult = "Approve",
Justification = "OK",
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentApprovals["{approval-id}"].Stages["{approvalStage-id}"].PatchAsync(requestBody);
// 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewApprovalStage()
reviewResult := "Approve"
requestBody.SetReviewResult(&reviewResult)
justification := "OK"
requestBody.SetJustification(&justification)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
stages, err := graphClient.IdentityGovernance().EntitlementManagement().AccessPackageAssignmentApprovals().ByApprovalId("approval-id").Stages().ByApprovalStageId("approvalStage-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ApprovalStage approvalStage = new ApprovalStage();
approvalStage.setReviewResult("Approve");
approvalStage.setJustification("OK");
ApprovalStage result = graphClient.identityGovernance().entitlementManagement().accessPackageAssignmentApprovals().byApprovalId("{approval-id}").stages().byApprovalStageId("{approvalStage-id}").patch(approvalStage);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ApprovalStage;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ApprovalStage();
$requestBody->setReviewResult('Approve');
$requestBody->setJustification('OK');
$result = $graphServiceClient->identityGovernance()->entitlementManagement()->accessPackageAssignmentApprovals()->byApprovalId('approval-id')->stages()->byApprovalStageId('approvalStage-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.approval_stage import ApprovalStage
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ApprovalStage(
review_result = "Approve",
justification = "OK",
)
result = await graph_client.identity_governance.entitlement_management.access_package_assignment_approvals.by_approval_id('approval-id').stages.by_approval_stage_id('approvalStage-id').patch(request_body)