Espace de noms : microsoft.graph.identityGovernance
Importante
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 .
Exécutez un objet de workflow à la demande avec une étendue spécifique. Vous pouvez exécuter n’importe quel workflow à la demande, y compris les workflows planifiés. Les workflows créés à partir du modèle « Arrêt en temps réel de l’employé » sont exécutés uniquement à la demande. Lorsque vous exécutez un workflow à la demande, les tâches sont exécutées, que l’état utilisateur corresponde ou non aux conditions d’exécution de l’étendue et du déclencheur.
Cette API est disponible dans les déploiements de cloud national suivants.
| Service global |
Gouvernement des États-Unis L4 |
Us Government L5 (DOD) |
Chine gérée par 21Vianet |
| ✅ |
✅ |
✅ |
✅ |
Autorisations
Choisissez l’autorisation ou les autorisations marquées comme moins privilégiées pour cette API. Utilisez une autorisation ou des autorisations privilégiées plus élevées uniquement si votre application en a besoin. Pour plus d’informations sur les autorisations déléguées et d’application, consultez Types d’autorisations. Pour en savoir plus sur ces autorisations, consultez les informations de référence sur les autorisations.
| Type d’autorisation |
Autorisations avec privilèges minimum |
Autorisations privilégiées plus élevées |
| Déléguée (compte professionnel ou scolaire) |
LifecycleWorkflows-Workflow.Activate |
LifecycleWorkflows-Workflow.ReadWrite.All, LifecycleWorkflows.ReadWrite.All |
| Déléguée (compte Microsoft personnel) |
Non prise en charge. |
Non prise en charge. |
| Application |
LifecycleWorkflows-Workflow.Activate |
LifecycleWorkflows-Workflow.ReadWrite.All, LifecycleWorkflows.ReadWrite.All |
Importante
Pour l’accès délégué à l’aide de comptes professionnels ou scolaires, l’utilisateur connecté doit se voir attribuer un rôle de Microsoft Entra pris en charge ou un rôle personnalisé qui accorde les autorisations requises pour cette opération.
L’administrateur des workflows de cycle de vie est le rôle le moins privilégié pris en charge pour cette opération.
Requête HTTP
POST /identityGovernance/lifecycleWorkflows/workflows/{workflowId}/activatewithscope
Corps de la demande
Dans le corps de la demande, fournissez une représentation JSON des paramètres.
Le tableau suivant présente les paramètres requis pour cette action.
Réponse
Si elle réussit, cette action renvoie un code de réponse 204 No Content.
Exemples
Exemple 1 : Activer un workflow avec une étendue spécifique de 2 utilisateurs
Demande
L’exemple suivant illustre une demande.
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/activatewithscope
Content-Type: application/json
{
"subjects": [
{ "id": "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97"},
{ "id": "ea09ac2e-77e3-4134-85f2-25ccf3c33387"}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivateWithScope;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new ActivateWithScopePostRequestBody
{
AdditionalData = new Dictionary<string, object>
{
{
"subjects" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("8cdf25a8-c9d2-423e-a03d-3f39f03c3e97")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("ea09ac2e-77e3-4134-85f2-25ccf3c33387")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityGovernance.LifecycleWorkflows.Workflows["{workflow-id}"].MicrosoftGraphIdentityGovernanceActivateWithScope.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.identitygovernance.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivatewithscope.ActivateWithScopePostRequestBody activateWithScopePostRequestBody = new com.microsoft.graph.beta.identitygovernance.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivatewithscope.ActivateWithScopePostRequestBody();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> subjects = new LinkedList<Object>();
property = new ();
property.setId("8cdf25a8-c9d2-423e-a03d-3f39f03c3e97");
subjects.add(property);
property1 = new ();
property1.setId("ea09ac2e-77e3-4134-85f2-25ccf3c33387");
subjects.add(property1);
additionalData.put("subjects", subjects);
activateWithScopePostRequestBody.setAdditionalData(additionalData);
graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").microsoftGraphIdentityGovernanceActivateWithScope().post(activateWithScopePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const activatewithscope = {
subjects: [
{ id: '8cdf25a8-c9d2-423e-a03d-3f39f03c3e97'},
{ id: 'ea09ac2e-77e3-4134-85f2-25ccf3c33387'}
]
};
await client.api('/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/activatewithscope')
.version('beta')
.post(activatewithscope);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceActivateWithScope\ActivateWithScopePostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ActivateWithScopePostRequestBody();
$additionalData = [
'subjects' => [
[
'id' => '8cdf25a8-c9d2-423e-a03d-3f39f03c3e97',
],
[
'id' => 'ea09ac2e-77e3-4134-85f2-25ccf3c33387',
],
],
];
$requestBody->setAdditionalData($additionalData);
$graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->microsoftGraphIdentityGovernanceActivateWithScope()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
$params = @{
subjects = @(
@{
id = "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97"
}
@{
id = "ea09ac2e-77e3-4134-85f2-25ccf3c33387"
}
)
}
Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.identitygovernance.lifecycleworkflows.workflows.item.microsoft_graph_identity_governance_activate_with_scope.activate_with_scope_post_request_body import ActivateWithScopePostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ActivateWithScopePostRequestBody(
additional_data = {
"subjects" : [
{
"id" : "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97",
},
{
"id" : "ea09ac2e-77e3-4134-85f2-25ccf3c33387",
},
],
}
)
await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').microsoft_graph_identity_governance_activate_with_scope.post(request_body)
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 204 No Content
Exemple 2 : Activer un workflow avec une étendue spécifique de 2 utilisateurs qui n’existent pas
Demande
L’exemple suivant illustre une demande.
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/2f0dcb02-65d9-4369-bad5-a3174538c5ff/activatewithscope
Content-Type: application/json
{
"scope": {
"@odata.type": "microsoft.graph.identityGovernance.activateProcessingResultScope",
"processingResults": [
{
"id": "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa"
},
{
"id": "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb"
}
],
"taskScope": "allTasks"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivateWithScope;
using Microsoft.Graph.Beta.Models.IdentityGovernance;
var requestBody = new ActivateWithScopePostRequestBody
{
Scope = new ActivateProcessingResultScope
{
OdataType = "microsoft.graph.identityGovernance.activateProcessingResultScope",
ProcessingResults = new List<UserProcessingResult>
{
new UserProcessingResult
{
Id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa",
},
new UserProcessingResult
{
Id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb",
},
},
TaskScope = ActivationTaskScopeType.AllTasks,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityGovernance.LifecycleWorkflows.Workflows["{workflow-id}"].MicrosoftGraphIdentityGovernanceActivateWithScope.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"
graphmodelsidentitygovernance "github.com/microsoftgraph/msgraph-beta-sdk-go/models/identitygovernance"
//other-imports
)
requestBody := graphidentitygovernance.NewActivateWithScopePostRequestBody()
scope := graphmodelsidentitygovernance.NewActivateProcessingResultScope()
userProcessingResult := graphmodelsidentitygovernance.NewUserProcessingResult()
id := "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa"
userProcessingResult.SetId(&id)
userProcessingResult1 := graphmodelsidentitygovernance.NewUserProcessingResult()
id := "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb"
userProcessingResult1.SetId(&id)
processingResults := []graphmodelsidentitygovernance.UserProcessingResultable {
userProcessingResult,
userProcessingResult1,
}
scope.SetProcessingResults(processingResults)
taskScope := graphmodels.ALLTASKS_ACTIVATIONTASKSCOPETYPE
scope.SetTaskScope(&taskScope)
requestBody.SetScope(scope)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.IdentityGovernance().LifecycleWorkflows().Workflows().ByWorkflowId("workflow-id").MicrosoftGraphIdentityGovernanceActivateWithScope().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.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivatewithscope.ActivateWithScopePostRequestBody activateWithScopePostRequestBody = new com.microsoft.graph.beta.identitygovernance.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivatewithscope.ActivateWithScopePostRequestBody();
com.microsoft.graph.beta.models.identitygovernance.ActivateProcessingResultScope scope = new com.microsoft.graph.beta.models.identitygovernance.ActivateProcessingResultScope();
scope.setOdataType("microsoft.graph.identityGovernance.activateProcessingResultScope");
LinkedList<com.microsoft.graph.beta.models.identitygovernance.UserProcessingResult> processingResults = new LinkedList<com.microsoft.graph.beta.models.identitygovernance.UserProcessingResult>();
com.microsoft.graph.beta.models.identitygovernance.UserProcessingResult userProcessingResult = new com.microsoft.graph.beta.models.identitygovernance.UserProcessingResult();
userProcessingResult.setId("abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa");
processingResults.add(userProcessingResult);
com.microsoft.graph.beta.models.identitygovernance.UserProcessingResult userProcessingResult1 = new com.microsoft.graph.beta.models.identitygovernance.UserProcessingResult();
userProcessingResult1.setId("abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb");
processingResults.add(userProcessingResult1);
scope.setProcessingResults(processingResults);
scope.setTaskScope(com.microsoft.graph.beta.models.identitygovernance.ActivationTaskScopeType.AllTasks);
activateWithScopePostRequestBody.setScope(scope);
graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").microsoftGraphIdentityGovernanceActivateWithScope().post(activateWithScopePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const activatewithscope = {
scope: {
'@odata.type': 'microsoft.graph.identityGovernance.activateProcessingResultScope',
processingResults: [
{
id: 'abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa'
},
{
id: 'abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb'
}
],
taskScope: 'allTasks'
}
};
await client.api('/identityGovernance/lifecycleWorkflows/workflows/2f0dcb02-65d9-4369-bad5-a3174538c5ff/activatewithscope')
.version('beta')
.post(activatewithscope);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceActivateWithScope\ActivateWithScopePostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\IdentityGovernance\ActivateProcessingResultScope;
use Microsoft\Graph\Beta\Generated\Models\IdentityGovernance\UserProcessingResult;
use Microsoft\Graph\Beta\Generated\Models\IdentityGovernance\ActivationTaskScopeType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ActivateWithScopePostRequestBody();
$scope = new ActivateProcessingResultScope();
$scope->setOdataType('microsoft.graph.identityGovernance.activateProcessingResultScope');
$processingResultsUserProcessingResult1 = new UserProcessingResult();
$processingResultsUserProcessingResult1->setId('abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa');
$processingResultsArray []= $processingResultsUserProcessingResult1;
$processingResultsUserProcessingResult2 = new UserProcessingResult();
$processingResultsUserProcessingResult2->setId('abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb');
$processingResultsArray []= $processingResultsUserProcessingResult2;
$scope->setProcessingResults($processingResultsArray);
$scope->setTaskScope(new ActivationTaskScopeType('allTasks'));
$requestBody->setScope($scope);
$graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->microsoftGraphIdentityGovernanceActivateWithScope()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
$params = @{
scope = @{
"@odata.type" = "microsoft.graph.identityGovernance.activateProcessingResultScope"
processingResults = @(
@{
id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa"
}
@{
id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb"
}
)
taskScope = "allTasks"
}
}
Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.identitygovernance.lifecycleworkflows.workflows.item.microsoft_graph_identity_governance_activate_with_scope.activate_with_scope_post_request_body import ActivateWithScopePostRequestBody
from msgraph_beta.generated.models.identity_governance.activate_processing_result_scope import ActivateProcessingResultScope
from msgraph_beta.generated.models.identity_governance.user_processing_result import UserProcessingResult
from msgraph_beta.generated.models.activation_task_scope_type import ActivationTaskScopeType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ActivateWithScopePostRequestBody(
scope = ActivateProcessingResultScope(
odata_type = "microsoft.graph.identityGovernance.activateProcessingResultScope",
processing_results = [
UserProcessingResult(
id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa",
),
UserProcessingResult(
id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb",
),
],
task_scope = ActivationTaskScopeType.AllTasks,
),
)
await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').microsoft_graph_identity_governance_activate_with_scope.post(request_body)
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 406 NOT Acceptable
Exemple 3 : Activer un workflow avec une étendue de résultat de traitement spécifique
Demande
L’exemple suivant illustre une demande.
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/2f0dcb02-65d9-4369-bad5-a3174538c5ff/activatewithscope
Content-Type: application/json
{
"subjects": [
{
"id": "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa"
},
{
"id": "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivateWithScope;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new ActivateWithScopePostRequestBody
{
AdditionalData = new Dictionary<string, object>
{
{
"subjects" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityGovernance.LifecycleWorkflows.Workflows["{workflow-id}"].MicrosoftGraphIdentityGovernanceActivateWithScope.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.identitygovernance.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivatewithscope.ActivateWithScopePostRequestBody activateWithScopePostRequestBody = new com.microsoft.graph.beta.identitygovernance.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivatewithscope.ActivateWithScopePostRequestBody();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> subjects = new LinkedList<Object>();
property = new ();
property.setId("abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa");
subjects.add(property);
property1 = new ();
property1.setId("abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb");
subjects.add(property1);
additionalData.put("subjects", subjects);
activateWithScopePostRequestBody.setAdditionalData(additionalData);
graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").microsoftGraphIdentityGovernanceActivateWithScope().post(activateWithScopePostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const activatewithscope = {
subjects: [
{
id: 'abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa'
},
{
id: 'abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb'
}
]
};
await client.api('/identityGovernance/lifecycleWorkflows/workflows/2f0dcb02-65d9-4369-bad5-a3174538c5ff/activatewithscope')
.version('beta')
.post(activatewithscope);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceActivateWithScope\ActivateWithScopePostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ActivateWithScopePostRequestBody();
$additionalData = [
'subjects' => [
[
'id' => 'abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa',
],
[
'id' => 'abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb',
],
],
];
$requestBody->setAdditionalData($additionalData);
$graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->microsoftGraphIdentityGovernanceActivateWithScope()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
$params = @{
subjects = @(
@{
id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa"
}
@{
id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb"
}
)
}
Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.identitygovernance.lifecycleworkflows.workflows.item.microsoft_graph_identity_governance_activate_with_scope.activate_with_scope_post_request_body import ActivateWithScopePostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ActivateWithScopePostRequestBody(
additional_data = {
"subjects" : [
{
"id" : "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa",
},
{
"id" : "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb",
},
],
}
)
await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').microsoft_graph_identity_governance_activate_with_scope.post(request_body)
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 204 No Content