Namespace: microsoft.graph.identityGovernance
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Aktivieren Sie einen Lebenszyklusworkflow für einen angegebenen Betreff, und warten Sie synchron auf den Abschluss der Ausführung. Diese Aktion gibt ein awaitedWorkflowProcessingResult mit dem Ausführungsergebnis zurück. Verwenden Sie diese Aktion, wenn Sie eine sofortige Bestätigung des Workflowabschlusses benötigen, z. B. bei der Bereitstellung eines Nichtbenutzerantragstellers.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
✅ |
✅ |
✅ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
LifecycleWorkflows-Workflow.Activate |
LifecycleWorkflows-Workflow.ReadWrite.All, LifecycleWorkflows.ReadWrite.All |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
LifecycleWorkflows-Workflow.Activate |
LifecycleWorkflows-Workflow.ReadWrite.All, LifecycleWorkflows.ReadWrite.All |
HTTP-Anforderung
POST /identityGovernance/lifecycleWorkflows/workflows/{workflowId}/activateAndWait
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung der Parameter an.
In der folgenden Tabelle sind die Parameter aufgeführt, die erforderlich sind, wenn Sie diese Aktion aufrufen.
| Parameter |
Typ |
Beschreibung |
| subject |
microsoft.graph.identityGovernance.workflowSubject |
Der Betreff, für den der Workflow aktiviert werden soll. Muss die @odata.type Eigenschaft enthalten, #microsoft.graph.identityGovernance.provisioningObjectWorkflowSubjectum den abgeleiteten Typ anzugeben (z. B. ). Erforderlich. |
Antwort
Bei erfolgreicher Ausführung gibt diese Aktion einen 200 OK Antwortcode und ein awaitedWorkflowProcessingResult im Antworttext zurück.
Beispiele
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879a93-6b91-4153-b7e6-5df4a7b7c5c8/activateAndWait
Content-Type: application/json
{
"subject": {
"@odata.type": "#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject",
"id": "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe",
"attributeSetEntries": [
{
"name": "department",
"value": "Engineering"
},
{
"name": "jobTitle",
"value": "Software Engineer"
}
]
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivateAndWait;
using Microsoft.Graph.Beta.Models.IdentityGovernance;
var requestBody = new ActivateAndWaitPostRequestBody
{
Subject = new ProvisioningObjectWorkflowSubject
{
OdataType = "#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject",
Id = "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe",
AttributeSetEntries = new List<AttributeSetEntry>
{
new AttributeSetEntry
{
Name = "department",
Value = "Engineering",
},
new AttributeSetEntry
{
Name = "jobTitle",
Value = "Software Engineer",
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.LifecycleWorkflows.Workflows["{workflow-id}"].MicrosoftGraphIdentityGovernanceActivateAndWait.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.NewActivateAndWaitPostRequestBody()
subject := graphmodelsidentitygovernance.NewProvisioningObjectWorkflowSubject()
id := "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe"
subject.SetId(&id)
attributeSetEntry := graphmodelsidentitygovernance.NewAttributeSetEntry()
name := "department"
attributeSetEntry.SetName(&name)
value := "Engineering"
attributeSetEntry.SetValue(&value)
attributeSetEntry1 := graphmodelsidentitygovernance.NewAttributeSetEntry()
name := "jobTitle"
attributeSetEntry1.SetName(&name)
value := "Software Engineer"
attributeSetEntry1.SetValue(&value)
attributeSetEntries := []graphmodelsidentitygovernance.AttributeSetEntryable {
attributeSetEntry,
attributeSetEntry1,
}
subject.SetAttributeSetEntries(attributeSetEntries)
requestBody.SetSubject(subject)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
microsoftGraphIdentityGovernanceActivateAndWait, err := graphClient.IdentityGovernance().LifecycleWorkflows().Workflows().ByWorkflowId("workflow-id").MicrosoftGraphIdentityGovernanceActivateAndWait().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.microsoftgraphidentitygovernanceactivateandwait.ActivateAndWaitPostRequestBody activateAndWaitPostRequestBody = new com.microsoft.graph.beta.identitygovernance.lifecycleworkflows.workflows.item.microsoftgraphidentitygovernanceactivateandwait.ActivateAndWaitPostRequestBody();
com.microsoft.graph.beta.models.identitygovernance.ProvisioningObjectWorkflowSubject subject = new com.microsoft.graph.beta.models.identitygovernance.ProvisioningObjectWorkflowSubject();
subject.setOdataType("#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject");
subject.setId("b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe");
LinkedList<com.microsoft.graph.beta.models.identitygovernance.AttributeSetEntry> attributeSetEntries = new LinkedList<com.microsoft.graph.beta.models.identitygovernance.AttributeSetEntry>();
com.microsoft.graph.beta.models.identitygovernance.AttributeSetEntry attributeSetEntry = new com.microsoft.graph.beta.models.identitygovernance.AttributeSetEntry();
attributeSetEntry.setName("department");
attributeSetEntry.setValue("Engineering");
attributeSetEntries.add(attributeSetEntry);
com.microsoft.graph.beta.models.identitygovernance.AttributeSetEntry attributeSetEntry1 = new com.microsoft.graph.beta.models.identitygovernance.AttributeSetEntry();
attributeSetEntry1.setName("jobTitle");
attributeSetEntry1.setValue("Software Engineer");
attributeSetEntries.add(attributeSetEntry1);
subject.setAttributeSetEntries(attributeSetEntries);
activateAndWaitPostRequestBody.setSubject(subject);
var result = graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").microsoftGraphIdentityGovernanceActivateAndWait().post(activateAndWaitPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const awaitedWorkflowProcessingResult = {
subject: {
'@odata.type': '#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject',
id: 'b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe',
attributeSetEntries: [
{
name: 'department',
value: 'Engineering'
},
{
name: 'jobTitle',
value: 'Software Engineer'
}
]
}
};
await client.api('/identityGovernance/lifecycleWorkflows/workflows/14879a93-6b91-4153-b7e6-5df4a7b7c5c8/activateAndWait')
.version('beta')
.post(awaitedWorkflowProcessingResult);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\MicrosoftGraphIdentityGovernanceActivateAndWait\ActivateAndWaitPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\IdentityGovernance\ProvisioningObjectWorkflowSubject;
use Microsoft\Graph\Beta\Generated\Models\IdentityGovernance\AttributeSetEntry;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ActivateAndWaitPostRequestBody();
$subject = new ProvisioningObjectWorkflowSubject();
$subject->setOdataType('#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject');
$subject->setId('b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe');
$attributeSetEntriesAttributeSetEntry1 = new AttributeSetEntry();
$attributeSetEntriesAttributeSetEntry1->setName('department');
$attributeSetEntriesAttributeSetEntry1->setValue('Engineering');
$attributeSetEntriesArray []= $attributeSetEntriesAttributeSetEntry1;
$attributeSetEntriesAttributeSetEntry2 = new AttributeSetEntry();
$attributeSetEntriesAttributeSetEntry2->setName('jobTitle');
$attributeSetEntriesAttributeSetEntry2->setValue('Software Engineer');
$attributeSetEntriesArray []= $attributeSetEntriesAttributeSetEntry2;
$subject->setAttributeSetEntries($attributeSetEntriesArray);
$requestBody->setSubject($subject);
$result = $graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->microsoftGraphIdentityGovernanceActivateAndWait()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
$params = @{
subject = @{
"@odata.type" = "#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject"
id = "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe"
attributeSetEntries = @(
@{
name = "department"
value = "Engineering"
}
@{
name = "jobTitle"
value = "Software Engineer"
}
)
}
}
Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait -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_and_wait.activate_and_wait_post_request_body import ActivateAndWaitPostRequestBody
from msgraph_beta.generated.models.identity_governance.provisioning_object_workflow_subject import ProvisioningObjectWorkflowSubject
from msgraph_beta.generated.models.identity_governance.attribute_set_entry import AttributeSetEntry
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ActivateAndWaitPostRequestBody(
subject = ProvisioningObjectWorkflowSubject(
odata_type = "#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject",
id = "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe",
attribute_set_entries = [
AttributeSetEntry(
name = "department",
value = "Engineering",
),
AttributeSetEntry(
name = "jobTitle",
value = "Software Engineer",
),
],
),
)
result = await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').microsoft_graph_identity_governance_activate_and_wait.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.identityGovernance.awaitedWorkflowProcessingResult",
"processingStatus": "completed",
"statusReasons": [],
"subject": {
"@odata.type": "#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject",
"id": "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe",
"attributeSetEntries": [
{
"name": "department",
"value": "Engineering"
},
{
"name": "jobTitle",
"value": "Software Engineer"
}
]
}
}