Modifica

workflow: cancelProcessing

Namespace: microsoft.graph.identityGovernance

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Cancel one or more workflow runs that are currently in queued or inProgress status. Currently limited to canceling one run per request.

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) LifecycleWorkflows-Workflow.ReadWrite.All LifecycleWorkflows.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application LifecycleWorkflows-Workflow.ReadWrite.All LifecycleWorkflows.ReadWrite.All

Important

For delegated access using work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that grants the permissions required for this operation. Lifecycle Workflows Administrator is the least privileged role supported for this operation.

HTTP request

POST /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/cancelProcessing

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the parameters.

The following table shows the parameters that are required with this action.

Parameter Type Description
scope microsoft.graph.identityGovernance.cancelScope Defines the scope of workflow runs to cancel. Currently only cancelRunsScope is supported. Required.

cancelRunsScope properties

When using cancelRunsScope, the @odata.type property is required in the request body.

Property Type Description
@odata.type String Must be #microsoft.graph.identityGovernance.cancelRunsScope. Required.
runs microsoft.graph.identityGovernance.run collection The workflow runs to cancel. Currently limited to one run per request. Required.

Response

If successful, this action returns a 204 No Content response code.

Examples

Example 1: Successfully cancel a workflow run

The following example shows a request that successfully cancels a single workflow run.

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/cancelProcessing
Content-Type: application/json

{
  "scope": {
    "@odata.type": "#microsoft.graph.identityGovernance.cancelRunsScope",
    "runs": [
      {
        "id": "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97"
      }
    ]
  }
}

Response

The following example shows the response.

HTTP/1.1 204 No Content