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 .
Vous devez fournir explicitement une @odata.type propriété qui indique si l’objet est un accessPackageAssignmentRequestWorkflowExtension ou un accessPackageAssignmentWorkflowExtension.
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 :
L’une des attributions de rôles Azure suivantes est requise sur l’application logique elle-même ou sur une étendue plus élevée, comme le groupe de ressources, l’abonnement ou le groupe d’administration :
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 propriétaire du catalogue est moins privilégié que l’autorisation d’application EntitlementManagement.Read.All . S’il s’agit d’un appel délégué sans la URL propriété dans logicAppTriggerEndpointConfiguration, l’appelant doit également être autorisé sur l’application logique.
Obligatoire. Configuration pour la sécurisation de l’appel d’API à l’application logique. Par exemple, l’utilisation du flux d’informations d’identification du client OAuth.
Configuration du rappel pour une extension personnalisée. Cette option est suppotée pour accessPackageAssignmentRequestWorkflowExtension.
Vous devez également fournir une propriété @odata.type avec une valeur du type d’extension de workflow de package d’accès spécifique. Par exemple : "@odata.type": "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension".
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new AccessPackageAssignmentRequestWorkflowExtension
{
OdataType = "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension",
DisplayName = "test_action_0124_email",
Description = "this is for graph testing only",
EndpointConfiguration = new LogicAppTriggerEndpointConfiguration
{
OdataType = "#microsoft.graph.logicAppTriggerEndpointConfiguration",
SubscriptionId = "38ab2ccc-3747-4567-b36b-9478f5602f0d",
ResourceGroupName = "test",
LogicAppWorkflowName = "elm-extension-email",
},
AuthenticationConfiguration = new AzureAdPopTokenAuthentication
{
OdataType = "#microsoft.graph.azureAdPopTokenAuthentication",
},
CallbackConfiguration = new CustomExtensionCallbackConfiguration
{
OdataType = "microsoft.graph.customExtensionCallbackConfiguration",
AdditionalData = new Dictionary<string, object>
{
{
"durationBeforeTimeout" , "PT1H"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs["{accessPackageCatalog-id}"].AccessPackageCustomWorkflowExtensions.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AccessPackageAssignmentRequestWorkflowExtension customCalloutExtension = new AccessPackageAssignmentRequestWorkflowExtension();
customCalloutExtension.setOdataType("#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension");
customCalloutExtension.setDisplayName("test_action_0124_email");
customCalloutExtension.setDescription("this is for graph testing only");
LogicAppTriggerEndpointConfiguration endpointConfiguration = new LogicAppTriggerEndpointConfiguration();
endpointConfiguration.setOdataType("#microsoft.graph.logicAppTriggerEndpointConfiguration");
endpointConfiguration.setSubscriptionId("38ab2ccc-3747-4567-b36b-9478f5602f0d");
endpointConfiguration.setResourceGroupName("test");
endpointConfiguration.setLogicAppWorkflowName("elm-extension-email");
customCalloutExtension.setEndpointConfiguration(endpointConfiguration);
AzureAdPopTokenAuthentication authenticationConfiguration = new AzureAdPopTokenAuthentication();
authenticationConfiguration.setOdataType("#microsoft.graph.azureAdPopTokenAuthentication");
customCalloutExtension.setAuthenticationConfiguration(authenticationConfiguration);
CustomExtensionCallbackConfiguration callbackConfiguration = new CustomExtensionCallbackConfiguration();
callbackConfiguration.setOdataType("microsoft.graph.customExtensionCallbackConfiguration");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("durationBeforeTimeout", "PT1H");
callbackConfiguration.setAdditionalData(additionalData);
customCalloutExtension.setCallbackConfiguration(callbackConfiguration);
CustomCalloutExtension result = graphClient.identityGovernance().entitlementManagement().accessPackageCatalogs().byAccessPackageCatalogId("{accessPackageCatalog-id}").accessPackageCustomWorkflowExtensions().post(customCalloutExtension);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\AccessPackageAssignmentRequestWorkflowExtension;
use Microsoft\Graph\Beta\Generated\Models\LogicAppTriggerEndpointConfiguration;
use Microsoft\Graph\Beta\Generated\Models\AzureAdPopTokenAuthentication;
use Microsoft\Graph\Beta\Generated\Models\CustomExtensionCallbackConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AccessPackageAssignmentRequestWorkflowExtension();
$requestBody->setOdataType('#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension');
$requestBody->setDisplayName('test_action_0124_email');
$requestBody->setDescription('this is for graph testing only');
$endpointConfiguration = new LogicAppTriggerEndpointConfiguration();
$endpointConfiguration->setOdataType('#microsoft.graph.logicAppTriggerEndpointConfiguration');
$endpointConfiguration->setSubscriptionId('38ab2ccc-3747-4567-b36b-9478f5602f0d');
$endpointConfiguration->setResourceGroupName('test');
$endpointConfiguration->setLogicAppWorkflowName('elm-extension-email');
$requestBody->setEndpointConfiguration($endpointConfiguration);
$authenticationConfiguration = new AzureAdPopTokenAuthentication();
$authenticationConfiguration->setOdataType('#microsoft.graph.azureAdPopTokenAuthentication');
$requestBody->setAuthenticationConfiguration($authenticationConfiguration);
$callbackConfiguration = new CustomExtensionCallbackConfiguration();
$callbackConfiguration->setOdataType('microsoft.graph.customExtensionCallbackConfiguration');
$additionalData = [
'durationBeforeTimeout' => 'PT1H',
];
$callbackConfiguration->setAdditionalData($additionalData);
$requestBody->setCallbackConfiguration($callbackConfiguration);
$result = $graphServiceClient->identityGovernance()->entitlementManagement()->accessPackageCatalogs()->byAccessPackageCatalogId('accessPackageCatalog-id')->accessPackageCustomWorkflowExtensions()->post($requestBody)->wait();
POST https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageCatalogs/32efb28c-9a7a-446c-986b-ca6528c6669d/accessPackagecustomWorkflowExtensions
Content-Type: application/json
{
"value":{
"@odata.type":"#microsoft.graph.accessPackageAssignmentWorkflowExtension",
"displayName":"test_action_0127_email",
"description":"this is for graph testing only",
"endpointConfiguration":{
"@odata.type":"#microsoft.graph.logicAppTriggerEndpointConfiguration",
"subscriptionId":"38ab2ccc-3747-4567-b36b-9478f5602f0d",
"resourceGroupName":"test",
"logicAppWorkflowName":"elm-extension-email"
},
"authenticationConfiguration":{
"@odata.type":"#microsoft.graph.azureAdPopTokenAuthentication"
}
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new CustomCalloutExtension
{
AdditionalData = new Dictionary<string, object>
{
{
"value" , new AccessPackageAssignmentWorkflowExtension
{
OdataType = "#microsoft.graph.accessPackageAssignmentWorkflowExtension",
DisplayName = "test_action_0127_email",
Description = "this is for graph testing only",
EndpointConfiguration = new LogicAppTriggerEndpointConfiguration
{
OdataType = "#microsoft.graph.logicAppTriggerEndpointConfiguration",
SubscriptionId = "38ab2ccc-3747-4567-b36b-9478f5602f0d",
ResourceGroupName = "test",
LogicAppWorkflowName = "elm-extension-email",
},
AuthenticationConfiguration = new AzureAdPopTokenAuthentication
{
OdataType = "#microsoft.graph.azureAdPopTokenAuthentication",
},
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs["{accessPackageCatalog-id}"].AccessPackageCustomWorkflowExtensions.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CustomCalloutExtension customCalloutExtension = new CustomCalloutExtension();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
AccessPackageAssignmentWorkflowExtension value = new AccessPackageAssignmentWorkflowExtension();
value.setOdataType("#microsoft.graph.accessPackageAssignmentWorkflowExtension");
value.setDisplayName("test_action_0127_email");
value.setDescription("this is for graph testing only");
LogicAppTriggerEndpointConfiguration endpointConfiguration = new LogicAppTriggerEndpointConfiguration();
endpointConfiguration.setOdataType("#microsoft.graph.logicAppTriggerEndpointConfiguration");
endpointConfiguration.setSubscriptionId("38ab2ccc-3747-4567-b36b-9478f5602f0d");
endpointConfiguration.setResourceGroupName("test");
endpointConfiguration.setLogicAppWorkflowName("elm-extension-email");
value.setEndpointConfiguration(endpointConfiguration);
AzureAdPopTokenAuthentication authenticationConfiguration = new AzureAdPopTokenAuthentication();
authenticationConfiguration.setOdataType("#microsoft.graph.azureAdPopTokenAuthentication");
value.setAuthenticationConfiguration(authenticationConfiguration);
additionalData.put("value", value);
customCalloutExtension.setAdditionalData(additionalData);
CustomCalloutExtension result = graphClient.identityGovernance().entitlementManagement().accessPackageCatalogs().byAccessPackageCatalogId("{accessPackageCatalog-id}").accessPackageCustomWorkflowExtensions().post(customCalloutExtension);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.custom_callout_extension import CustomCalloutExtension
from msgraph_beta.generated.models.access_package_assignment_workflow_extension import AccessPackageAssignmentWorkflowExtension
from msgraph_beta.generated.models.logic_app_trigger_endpoint_configuration import LogicAppTriggerEndpointConfiguration
from msgraph_beta.generated.models.azure_ad_pop_token_authentication import AzureAdPopTokenAuthentication
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = CustomCalloutExtension(
additional_data = {
"value" : {
"@odata_type" : "#microsoft.graph.accessPackageAssignmentWorkflowExtension",
"display_name" : "test_action_0127_email",
"description" : "this is for graph testing only",
"endpoint_configuration" : {
"@odata_type" : "#microsoft.graph.logicAppTriggerEndpointConfiguration",
"subscription_id" : "38ab2ccc-3747-4567-b36b-9478f5602f0d",
"resource_group_name" : "test",
"logic_app_workflow_name" : "elm-extension-email",
},
"authentication_configuration" : {
"@odata_type" : "#microsoft.graph.azureAdPopTokenAuthentication",
},
},
}
)
result = await graph_client.identity_governance.entitlement_management.access_package_catalogs.by_access_package_catalog_id('accessPackageCatalog-id').access_package_custom_workflow_extensions.post(request_body)