Escolha a permissão ou permissões marcadas como menos privilegiadas para esta API. Utilize uma permissão ou permissões com privilégios mais elevados apenas se a sua aplicação o exigir. Para obter detalhes sobre as permissões delegadas e de aplicação, veja Tipos de permissão. Para saber mais sobre estas permissões, veja a referência de permissões.
Tipo de permissão
Permissões com menos privilégios
Permissões com privilégios superiores
Delegado (conta corporativa ou de estudante)
Ciclo de VidaWorkflows.ReadWrite.All
Indisponível.
Delegado (conta pessoal da Microsoft)
Sem suporte.
Sem suporte.
Application
Ciclo de VidaWorkflows.ReadWrite.All
Indisponível.
Importante
Em cenários delegados com contas escolares ou profissionais, o utilizador com sessão iniciada tem de ter uma função de Microsoft Entra suportada ou uma função personalizada com uma permissão de função suportada.
O Administrador de Fluxos de Trabalho do Ciclo de Vida é a função com menos privilégios suportada para esta operação.
Importante
O seguinte aplica-se ao acesso apenas à aplicação para seguir melhor o princípio do menor privilégio:
O customtaskextensionCallbackData da tarefaProcessingResult. A aplicação lógica devolve uma operação status se foi ou não executada com êxito. O taskprocessingresult é retomado com base na forma como a tarefa foi concebida no fluxo de trabalho.
Resposta
Se tiver êxito, esta ação retornará um código de resposta 204 No Content.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume;
using Microsoft.Graph.Models.IdentityGovernance;
var requestBody = new ResumePostRequestBody
{
Data = new CustomTaskExtensionCallbackData
{
OperationStatus = CustomTaskExtensionOperationStatus.Completed,
},
Source = "sample",
Type = "lifecycleEvent",
};
// 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}"].Tasks["{task-id}"].TaskProcessingResults["{taskProcessingResult-id}"].MicrosoftGraphIdentityGovernanceResume.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"
graphmodelsidentitygovernance "github.com/microsoftgraph/msgraph-sdk-go/models/identitygovernance"
//other-imports
)
requestBody := graphidentitygovernance.NewResumePostRequestBody()
data := graphmodelsidentitygovernance.NewCustomTaskExtensionCallbackData()
operationStatus := graphmodels.COMPLETED_CUSTOMTASKEXTENSIONOPERATIONSTATUS
data.SetOperationStatus(&operationStatus)
requestBody.SetData(data)
source := "sample"
requestBody.SetSource(&source)
type := "lifecycleEvent"
requestBody.SetType(&type)
// 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").Tasks().ByTaskId("task-id").TaskProcessingResults().ByTaskProcessingResultId("taskProcessingResult-id").MicrosoftGraphIdentityGovernanceResume().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.lifecycleworkflows.workflows.item.tasks.item.taskprocessingresults.item.microsoftgraphidentitygovernanceresume.ResumePostRequestBody resumePostRequestBody = new com.microsoft.graph.identitygovernance.lifecycleworkflows.workflows.item.tasks.item.taskprocessingresults.item.microsoftgraphidentitygovernanceresume.ResumePostRequestBody();
com.microsoft.graph.models.identitygovernance.CustomTaskExtensionCallbackData data = new com.microsoft.graph.models.identitygovernance.CustomTaskExtensionCallbackData();
data.setOperationStatus(com.microsoft.graph.models.identitygovernance.CustomTaskExtensionOperationStatus.Completed);
resumePostRequestBody.setData(data);
resumePostRequestBody.setSource("sample");
resumePostRequestBody.setType("lifecycleEvent");
graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").tasks().byTaskId("{task-id}").taskProcessingResults().byTaskProcessingResultId("{taskProcessingResult-id}").microsoftGraphIdentityGovernanceResume().post(resumePostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\Tasks\Item\TaskProcessingResults\Item\MicrosoftGraphIdentityGovernanceResume\ResumePostRequestBody;
use Microsoft\Graph\Generated\Models\IdentityGovernance\CustomTaskExtensionCallbackData;
use Microsoft\Graph\Generated\Models\IdentityGovernance\CustomTaskExtensionOperationStatus;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ResumePostRequestBody();
$data = new CustomTaskExtensionCallbackData();
$data->setOperationStatus(new CustomTaskExtensionOperationStatus('completed'));
$requestBody->setData($data);
$requestBody->setSource('sample');
$requestBody->setType('lifecycleEvent');
$graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->tasks()->byTaskId('task-id')->taskProcessingResults()->byTaskProcessingResultId('taskProcessingResult-id')->microsoftGraphIdentityGovernanceResume()->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.lifecycleworkflows.workflows.item.tasks.item.taskprocessingresults.item.microsoft_graph_identity_governance_resume.resume_post_request_body import ResumePostRequestBody
from msgraph.generated.models.identity_governance.custom_task_extension_callback_data import CustomTaskExtensionCallbackData
from msgraph.generated.models.custom_task_extension_operation_status import CustomTaskExtensionOperationStatus
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ResumePostRequestBody(
data = CustomTaskExtensionCallbackData(
operation_status = CustomTaskExtensionOperationStatus.Completed,
),
source = "sample",
type = "lifecycleEvent",
)
await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').tasks.by_task_id('task-id').task_processing_results.by_task_processing_result_id('taskProcessingResult-id').microsoft_graph_identity_governance_resume.post(request_body)