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 .
Le /accessPackageAssignmentRequests chemin sera bientôt mis hors service. Utilisez le chemin d’accès /assignmentRequests à la place.
POST /identityGovernance/entitlementManagement/assignmentRequests/{accessPackageAssignmentRequestId}/cancel
POST /identityGovernance/entitlementManagement/accessPackageAssignmentRequests/{id}/cancel
Pour qu’un utilisateur non administrateur annule sa propre demande, la requête doit contenir l’ID de l’objet accessPackageAssignmentRequest et un requestStatus avec la valeur cancelled.
Réponse
Si elle réussit, cette méthode renvoie un code de réponse 200 OK. Il ne retourne rien dans le corps de la réponse.
POST https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentRequests/{id}/cancel
{
"id":"request-id",
"requestStatus":"cancelled"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Cancel;
var requestBody = new CancelPostRequestBody
{
AdditionalData = new Dictionary<string, object>
{
{
"id" , "request-id"
},
{
"requestStatus" , "cancelled"
},
},
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests["{accessPackageAssignmentRequest-id}"].Cancel.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"
//other-imports
)
requestBody := graphidentitygovernance.NewCancelPostRequestBody()
additionalData := map[string]interface{}{
"id" : "request-id",
"requestStatus" : "cancelled",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.IdentityGovernance().EntitlementManagement().AccessPackageAssignmentRequests().ByAccessPackageAssignmentRequestId("accessPackageAssignmentRequest-id").Cancel().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.entitlementmanagement.accesspackageassignmentrequests.item.cancel.CancelPostRequestBody cancelPostRequestBody = new com.microsoft.graph.beta.identitygovernance.entitlementmanagement.accesspackageassignmentrequests.item.cancel.CancelPostRequestBody();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("id", "request-id");
additionalData.put("requestStatus", "cancelled");
cancelPostRequestBody.setAdditionalData(additionalData);
graphClient.identityGovernance().entitlementManagement().accessPackageAssignmentRequests().byAccessPackageAssignmentRequestId("{accessPackageAssignmentRequest-id}").cancel().post(cancelPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.identitygovernance.entitlementmanagement.accesspackageassignmentrequests.item.cancel.cancel_post_request_body import CancelPostRequestBody
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = CancelPostRequestBody(
additional_data = {
"id" : "request-id",
"request_status" : "cancelled",
}
)
await graph_client.identity_governance.entitlement_management.access_package_assignment_requests.by_access_package_assignment_request_id('accessPackageAssignmentRequest-id').cancel.post(request_body)