|
| 1 | +--- |
| 2 | +title: "workflow: cancelProcessing" |
| 3 | +description: "Cancel workflow runs that are currently in progress or queued." |
| 4 | +author: "KristinaSmith" |
| 5 | +ms.localizationpriority: medium |
| 6 | +ms.subservice: "entra-id-governance" |
| 7 | +doc_type: apiPageType |
| 8 | +ms.date: 03/26/2026 |
| 9 | +--- |
| 10 | + |
| 11 | +# workflow: cancelProcessing |
| 12 | + |
| 13 | +Namespace: microsoft.graph.identityGovernance |
| 14 | + |
| 15 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 16 | + |
| 17 | +Cancel one or more [workflow](../resources/identitygovernance-workflow.md) runs that are currently in `queued` or `inProgress` status. Currently limited to canceling one run per request. |
| 18 | + |
| 19 | +## Permissions |
| 20 | + |
| 21 | +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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 22 | + |
| 23 | +<!-- { "blockType": "permissions", "name": "identitygovernance_workflow_cancelprocessing" } --> |
| 24 | + |
| 25 | +[!INCLUDE [permissions-table](../includes/permissions/identitygovernance-workflow-cancelprocessing-permissions.md)] |
| 26 | + |
| 27 | +[!INCLUDE [rbac-lifecycle-workflows-apis-write](../includes/rbac-for-apis/rbac-lifecycle-workflows-apis-write.md)] |
| 28 | + |
| 29 | +## HTTP request |
| 30 | + |
| 31 | +<!-- { |
| 32 | + "blockType": "ignored" |
| 33 | +} |
| 34 | +--> |
| 35 | +```http |
| 36 | +POST /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/cancelProcessing |
| 37 | +``` |
| 38 | + |
| 39 | +## Request headers |
| 40 | + |
| 41 | +|Name|Description| |
| 42 | +|:---|:---| |
| 43 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 44 | +|Content-Type|application/json. Required.| |
| 45 | + |
| 46 | +## Request body |
| 47 | + |
| 48 | +In the request body, supply a JSON representation of the parameters. |
| 49 | + |
| 50 | +The following table shows the parameters that are required with this action. |
| 51 | + |
| 52 | +|Parameter|Type|Description| |
| 53 | +|:---|:---|:---| |
| 54 | +|scope|[microsoft.graph.identityGovernance.cancelScope](../resources/identitygovernance-cancelscope.md)|Defines the scope of workflow runs to cancel. Currently only [cancelRunsScope](../resources/identitygovernance-cancelrunsscope.md) is supported. Required.| |
| 55 | + |
| 56 | +### cancelRunsScope properties |
| 57 | + |
| 58 | +When using [cancelRunsScope](../resources/identitygovernance-cancelrunsscope.md), the `@odata.type` property is required in the request body. |
| 59 | + |
| 60 | +|Property|Type|Description| |
| 61 | +|:---|:---|:---| |
| 62 | +|@odata.type|String|Must be `#microsoft.graph.identityGovernance.cancelRunsScope`. Required.| |
| 63 | +|runs|[microsoft.graph.identityGovernance.run](../resources/identitygovernance-run.md) collection|The workflow runs to cancel. Currently limited to one run per request. Required.| |
| 64 | + |
| 65 | +## Response |
| 66 | + |
| 67 | +If successful, this action returns a `204 No Content` response code. |
| 68 | + |
| 69 | +## Examples |
| 70 | + |
| 71 | +### Example 1: Successfully cancel a workflow run |
| 72 | + |
| 73 | +The following example shows a request that successfully cancels a single workflow run. |
| 74 | + |
| 75 | +#### Request |
| 76 | + |
| 77 | +The following example shows a request. |
| 78 | + |
| 79 | +<!-- { |
| 80 | + "blockType": "request", |
| 81 | + "name": "lifecycleworkflows_workflow_cancelprocessing_success" |
| 82 | +} |
| 83 | +--> |
| 84 | +```http |
| 85 | +POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/cancelProcessing |
| 86 | +Content-Type: application/json |
| 87 | +
|
| 88 | +{ |
| 89 | + "scope": { |
| 90 | + "@odata.type": "#microsoft.graph.identityGovernance.cancelRunsScope", |
| 91 | + "runs": [ |
| 92 | + { |
| 93 | + "id": "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97" |
| 94 | + } |
| 95 | + ] |
| 96 | + } |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +#### Response |
| 103 | + |
| 104 | +The following example shows the response. |
| 105 | + |
| 106 | +<!-- { |
| 107 | + "blockType": "response", |
| 108 | + "truncated": true |
| 109 | +} --> |
| 110 | +```http |
| 111 | +HTTP/1.1 204 No Content |
| 112 | +``` |
0 commit comments