Reprendre la demande de package d’accès d’un utilisateur après avoir attendu un rappel à partir d’une extension personnalisée.
Dans Microsoft Entra gestion des droits d’utilisation, lorsqu’une stratégie de package d’accès a été activée pour appeler une extension personnalisée et que le traitement de la demande attend le rappel du client, le client peut lancer une action de reprise. Elle est effectuée sur un objet accessPackageAssignmentRequest dont requestStatus est dans un WaitingForCallback état.
Dans les scénarios délégués avec des comptes professionnels ou scolaires, l’utilisateur connecté doit également se voir attribuer un rôle d’administrateur avec des autorisations de rôle prises en charge via l’une des options suivantes :
Gestionnaire d’affectation de package d’accès.
Il s’agit de l’option la moins privilégiée
Gestionnaire de package d’accès
Propriétaire du catalogue
Rôles Microsoft Entra privilégiés pris en charge pour cette opération :
Administrateur de gouvernance des identités
Dans les scénarios d’application uniquement, l’application appelante peut se voir attribuer l’un des rôles pris en charge précédents au lieu de l’autorisation d’application EntitlementManagement.ReadWrite.All . Le rôle gestionnaire d’affectation de package d’accès est moins privilégié que l’autorisation de l’application EntitlementManagement.ReadWrite.All .
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
source
String
Source à partir de laquelle le client tente de reprendre la demande, qui peut être stockée dans le service et sera utile pour l’audit.
type
String
Indiquez à quel stade l’extension de légende personnalisée a été exécutée. Les valeurs possibles sont : microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated, microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestApproved, microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestGranted, microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestRemoved
POST https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/assignmentRequests/0e60f18c-b2a0-4887-9da8-da2e30a39d99/resume
Content-Type: application/json
{
"source": "Contoso.SodCheckProcess",
"type": "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated",
"data": {
"@odata.type": "microsoft.graph.accessPackageAssignmentRequestCallbackData",
"stage": "assignmentRequestCreated",
"customExtensionStageInstanceId": "957d0c50-466b-4840-bb5b-c92cea7141ff",
"customExtensionStageInstanceDetail": "This user is all verified"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.IdentityGovernance.EntitlementManagement.AssignmentRequests.Item.Resume;
using Microsoft.Graph.Models;
var requestBody = new ResumePostRequestBody
{
Source = "Contoso.SodCheckProcess",
Type = "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated",
Data = new AccessPackageAssignmentRequestCallbackData
{
OdataType = "microsoft.graph.accessPackageAssignmentRequestCallbackData",
Stage = AccessPackageCustomExtensionStage.AssignmentRequestCreated,
CustomExtensionStageInstanceId = "957d0c50-466b-4840-bb5b-c92cea7141ff",
CustomExtensionStageInstanceDetail = "This user is all verified",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityGovernance.EntitlementManagement.AssignmentRequests["{accessPackageAssignmentRequest-id}"].Resume.PostAsync(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"
graphidentitygovernance "github.com/microsoftgraph/msgraph-sdk-go/identitygovernance"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphidentitygovernance.NewResumePostRequestBody()
source := "Contoso.SodCheckProcess"
requestBody.SetSource(&source)
type := "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated"
requestBody.SetType(&type)
data := graphmodels.NewAccessPackageAssignmentRequestCallbackData()
stage := graphmodels.ASSIGNMENTREQUESTCREATED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE
data.SetStage(&stage)
customExtensionStageInstanceId := "957d0c50-466b-4840-bb5b-c92cea7141ff"
data.SetCustomExtensionStageInstanceId(&customExtensionStageInstanceId)
customExtensionStageInstanceDetail := "This user is all verified"
data.SetCustomExtensionStageInstanceDetail(&customExtensionStageInstanceDetail)
requestBody.SetData(data)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.IdentityGovernance().EntitlementManagement().AssignmentRequests().ByAccessPackageAssignmentRequestId("accessPackageAssignmentRequest-id").Resume().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.identitygovernance.entitlementmanagement.assignmentrequests.item.resume.ResumePostRequestBody resumePostRequestBody = new com.microsoft.graph.identitygovernance.entitlementmanagement.assignmentrequests.item.resume.ResumePostRequestBody();
resumePostRequestBody.setSource("Contoso.SodCheckProcess");
resumePostRequestBody.setType("microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated");
AccessPackageAssignmentRequestCallbackData data = new AccessPackageAssignmentRequestCallbackData();
data.setOdataType("microsoft.graph.accessPackageAssignmentRequestCallbackData");
data.setStage(AccessPackageCustomExtensionStage.AssignmentRequestCreated);
data.setCustomExtensionStageInstanceId("957d0c50-466b-4840-bb5b-c92cea7141ff");
data.setCustomExtensionStageInstanceDetail("This user is all verified");
resumePostRequestBody.setData(data);
graphClient.identityGovernance().entitlementManagement().assignmentRequests().byAccessPackageAssignmentRequestId("{accessPackageAssignmentRequest-id}").resume().post(resumePostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\IdentityGovernance\EntitlementManagement\AssignmentRequests\Item\Resume\ResumePostRequestBody;
use Microsoft\Graph\Generated\Models\AccessPackageAssignmentRequestCallbackData;
use Microsoft\Graph\Generated\Models\AccessPackageCustomExtensionStage;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ResumePostRequestBody();
$requestBody->setSource('Contoso.SodCheckProcess');
$requestBody->setType('microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated');
$data = new AccessPackageAssignmentRequestCallbackData();
$data->setOdataType('microsoft.graph.accessPackageAssignmentRequestCallbackData');
$data->setStage(new AccessPackageCustomExtensionStage('assignmentRequestCreated'));
$data->setCustomExtensionStageInstanceId('957d0c50-466b-4840-bb5b-c92cea7141ff');
$data->setCustomExtensionStageInstanceDetail('This user is all verified');
$requestBody->setData($data);
$graphServiceClient->identityGovernance()->entitlementManagement()->assignmentRequests()->byAccessPackageAssignmentRequestId('accessPackageAssignmentRequest-id')->resume()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.identitygovernance.entitlementmanagement.assignmentrequests.item.resume.resume_post_request_body import ResumePostRequestBody
from msgraph.generated.models.access_package_assignment_request_callback_data import AccessPackageAssignmentRequestCallbackData
from msgraph.generated.models.access_package_custom_extension_stage import AccessPackageCustomExtensionStage
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ResumePostRequestBody(
source = "Contoso.SodCheckProcess",
type = "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated",
data = AccessPackageAssignmentRequestCallbackData(
odata_type = "microsoft.graph.accessPackageAssignmentRequestCallbackData",
stage = AccessPackageCustomExtensionStage.AssignmentRequestCreated,
custom_extension_stage_instance_id = "957d0c50-466b-4840-bb5b-c92cea7141ff",
custom_extension_stage_instance_detail = "This user is all verified",
),
)
await graph_client.identity_governance.entitlement_management.assignment_requests.by_access_package_assignment_request_id('accessPackageAssignmentRequest-id').resume.post(request_body)
Exemple 2 : Reprendre et refuser une demande d’attribution de package d’accès
Demande
L’exemple suivant montre une demande de reprise du traitement d’une demande d’attribution de package d’accès en refusant la requête en attente d’un rappel. Une demande ne peut pas être refusée au assignmentRequestCreated stade de la légende.
POST https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/assignmentRequests/9e60f18c-b2a0-4887-9da8-da2e30a39d99/resume
Content-Type: application/json
{
"source": "Contoso.SodCheckProcess",
"type": "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated",
"data": {
"@odata.type": "microsoft.graph.accessPackageAssignmentRequestCallbackData",
"stage": "AssignmentRequestCreated",
"customExtensionStageInstanceId": "857d0c50-466b-4840-bb5b-c92cea7141ff",
"state": "denied",
"customExtensionStageInstanceDetail": "Potential risk user based on the SOD check"
}
}