Skip to content

Commit 6d52a66

Browse files
OWinfreyATLmsewaweruDanipocketFaithOmbongi
authored
[Public Preview] Lifecycle Workflows Preview Mode (#28313)
* [Public Preview] Lifecycle Workflows Preview Mode * Fix whats-new links * Fix spacing * Updates * Updates * Updates * Discrepancy fix * Updates * Search added back * Deprecation tags removed * previewfailedtask resource file added * Updates * Updates * Updates * Upodates to odata type * Update api-reference/beta/resources/identitygovernance-workflow.md Co-authored-by: Eunice Waweru <73849846+msewaweru@users.noreply.github.com> * Updates * Removed deprecation note * update * Apply suggestions from code review Co-authored-by: Danipocket <88507770+Danipocket@users.noreply.github.com> * Apply suggestion from @FaithOmbongi * Apply suggestion from @FaithOmbongi --------- Co-authored-by: Eunice Waweru <73849846+msewaweru@users.noreply.github.com> Co-authored-by: Danipocket <88507770+Danipocket@users.noreply.github.com> Co-authored-by: Faith Moraa Ombongi <ombongi.moraa.fe@gmail.com>
1 parent 38604a5 commit 6d52a66

9 files changed

Lines changed: 415 additions & 0 deletions

api-reference/beta/api/identitygovernance-workflow-get.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,70 @@ Content-Type: application/json
231231
}
232232
}
233233
```
234+
235+
### Example 3: Retrieve a workflow with the previewScope relationship expanded
236+
237+
#### Request
238+
239+
The following example shows a request.
240+
241+
<!-- {
242+
"blockType": "request",
243+
"name": "lifecycleworkflows_get_workflow_expand_previewscope"
244+
}
245+
-->
246+
```msgraph-interactive
247+
GET https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341?$expand=previewScope
248+
```
249+
250+
#### Response
251+
252+
The following example shows the response.
253+
254+
<!-- {
255+
"blockType": "response",
256+
"truncated": true,
257+
"@odata.type": "microsoft.graph.identityGovernance.workflow"
258+
}
259+
-->
260+
```http
261+
HTTP/1.1 200 OK
262+
Content-Type: application/json
263+
264+
{
265+
"@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/workflows/$entity",
266+
"id": "14879e66-9ea9-48d0-804d-8fea672d0341",
267+
"category": "joiner",
268+
"displayName": "Onboard pre-hire employee",
269+
"description": "Configure pre-hire tasks for onboarding employees before their start date",
270+
"isEnabled": true,
271+
"isSchedulingEnabled": true,
272+
"version": 1,
273+
"createdDateTime": "2024-01-15T10:30:00Z",
274+
"lastModifiedDateTime": "2024-01-15T10:30:00Z",
275+
"deletedDateTime": null,
276+
"nextScheduleRunDateTime": "2024-01-16T08:00:00Z",
277+
"executionConditions": {
278+
"@odata.type": "#microsoft.graph.identityGovernance.triggerAndScopeBasedConditions",
279+
"scope": {
280+
"@odata.type": "#microsoft.graph.identityGovernance.ruleBasedSubjectSet",
281+
"rule": "(employeeHireDate ne null)"
282+
},
283+
"trigger": {
284+
"@odata.type": "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger",
285+
"timeBasedAttribute": "employeeHireDate",
286+
"offsetInDays": -7
287+
}
288+
},
289+
"previewScope": [
290+
{
291+
"@odata.type": "#microsoft.graph.user",
292+
"id": "b59552b8-fa7b-4f68-8496-0a529aace8c0"
293+
},
294+
{
295+
"@odata.type": "#microsoft.graph.user",
296+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
297+
}
298+
]
299+
}
300+
```
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: "workflow: previewTaskFailures"
3+
description: "Validate the tasks configured in a workflow to check for configuration errors."
4+
author: "AlexFilipin"
5+
ms.localizationpriority: medium
6+
ms.subservice: "entra-id-governance"
7+
doc_type: apiPageType
8+
ms.date: 02/25/2026
9+
---
10+
11+
# workflow: previewTaskFailures
12+
13+
Namespace: microsoft.graph.identityGovernance
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Validate the tasks configured in a [workflow](../resources/identitygovernance-workflow.md) to check for configuration errors. This action identifies any tasks that would fail during execution, allowing you to fix issues before running the workflow. Returns an empty collection if no task failures are detected.
18+
19+
[!INCLUDE [national-cloud-support](../../includes/all-clouds.md)]
20+
21+
## Permissions
22+
23+
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).
24+
25+
<!-- { "blockType": "permissions", "name": "identitygovernance_workflow_previewtaskfailures" } -->
26+
27+
[!INCLUDE [permissions-table](../includes/permissions/identitygovernance-workflow-previewtaskfailures-permissions.md)]
28+
29+
[!INCLUDE [rbac-lifecycle-workflows-apis-read](../includes/rbac-for-apis/rbac-lifecycle-workflows-apis-read.md)]
30+
31+
## HTTP request
32+
33+
<!-- {
34+
"blockType": "ignored"
35+
}
36+
-->
37+
```http
38+
POST /identityGovernance/lifecycleWorkflows/workflows/{workflow-id}/previewTaskFailures
39+
```
40+
41+
## Request headers
42+
43+
|Name|Description|
44+
|:---|:---|
45+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
46+
|Content-Type|application/json. Required.|
47+
48+
## Request body
49+
50+
Don't supply a request body for this method.
51+
52+
## Response
53+
54+
If successful, this action returns a `200 OK` response code and a collection of [previewFailedTasks](../resources/identitygovernance-previewfailedtask.md) objects in the response body. If no task failures are detected, an empty collection is returned.
55+
56+
## Examples
57+
58+
### Example 1: Workflow with task failures
59+
60+
The following example shows a request that validates a workflow and returns task failures.
61+
62+
#### Request
63+
64+
The following example shows a request.
65+
66+
<!-- {
67+
"blockType": "request",
68+
"name": "lifecycleworkflows_workflow_previewtaskfailures_failures"
69+
}
70+
-->
71+
```http
72+
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/previewTaskFailures
73+
```
74+
75+
#### Response
76+
77+
The following example shows the response.
78+
79+
<!-- {
80+
"blockType": "response",
81+
"truncated": true,
82+
"@odata.type": "Collection(microsoft.graph.identityGovernance.previewFailedTask)"
83+
} -->
84+
```http
85+
HTTP/1.1 200 OK
86+
Content-Type: application/json
87+
88+
{
89+
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.identityGovernance.previewFailedTask)",
90+
"value": [
91+
{
92+
"name": "Generate Temporary Access Pass",
93+
"definitionId": "1b555e50-7f65-41d5-b514-5894a026d10d",
94+
"failureReason": "The logged-in user does not have sufficient privileges to generate a TAP. Required role: Authentication Policy Administrator",
95+
"taskId": "8bb25690-6104-4e29-943e-1f67b8e662f5"
96+
}
97+
]
98+
}
99+
```
100+
101+
### Example 2: Workflow with no task failures
102+
103+
The following example shows a request that validates a workflow with no configuration issues.
104+
105+
#### Request
106+
107+
The following example shows a request.
108+
109+
<!-- {
110+
"blockType": "request",
111+
"name": "lifecycleworkflows_workflow_previewtaskfailures_nofailures"
112+
}
113+
-->
114+
```http
115+
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/a1b2c3d4-e5f6-7890-abcd-ef1234567890/previewTaskFailures
116+
```
117+
118+
#### Response
119+
120+
The following example shows the response.
121+
122+
<!-- {
123+
"blockType": "response",
124+
"truncated": true,
125+
"@odata.type": "Collection(microsoft.graph.identityGovernance.previewFailedTask)"
126+
} -->
127+
```http
128+
HTTP/1.1 200 OK
129+
Content-Type: application/json
130+
131+
{
132+
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.identityGovernance.previewFailedTask)",
133+
"value": []
134+
}
135+
```
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: "workflow: previewWorkflow"
3+
description: "Run a workflow in preview mode for selected directory objects without affecting production users."
4+
author: "AlexFilipin"
5+
ms.localizationpriority: medium
6+
ms.subservice: "entra-id-governance"
7+
doc_type: apiPageType
8+
ms.date: 02/25/2026
9+
---
10+
11+
# workflow: previewWorkflow
12+
13+
Namespace: microsoft.graph.identityGovernance
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Run a [workflow](../resources/identitygovernance-workflow.md) in preview mode for selected directory objects without affecting production users. This action triggers workflow processing in preview mode, and results can be retrieved using the [List userProcessingResults](identitygovernance-workflow-list-userprocessingresults.md) operation with `$filter=workflowExecutionType eq 'previewMode'`.
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_previewworkflow" } -->
24+
25+
[!INCLUDE [permissions-table](../includes/permissions/identitygovernance-workflow-previewworkflow-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}/previewWorkflow
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+
|subjects|[directoryObject](../resources/directoryobject.md) collection|A collection of directory objects (typically users) to include in the preview run. Maximum of 10 subjects per request. Required.|
55+
56+
## Response
57+
58+
If successful, this action returns a `204 No Content` response code.
59+
60+
To retrieve the results of the preview run, use the [List userProcessingResults](identitygovernance-workflow-list-userprocessingresults.md) operation with `$filter=workflowExecutionType eq 'previewMode'`. Results may not be immediately available; timing depends on workflow complexity. Results may include users from previous preview runs for the same workflow.
61+
62+
## Examples
63+
64+
### Request
65+
66+
The following example shows a request.
67+
68+
<!-- {
69+
"blockType": "request",
70+
"name": "lifecycleworkflows_workflow_previewworkflow"
71+
}
72+
-->
73+
```http
74+
POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/previewWorkflow
75+
Content-Type: application/json
76+
77+
{
78+
"subjects": [
79+
{
80+
"@odata.type": "#microsoft.graph.user",
81+
"id": "b59552b8-fa7b-4f68-8496-0a529aace8c0"
82+
},
83+
{
84+
"@odata.type": "#microsoft.graph.user",
85+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
86+
}
87+
]
88+
}
89+
```
90+
91+
### Response
92+
93+
The following example shows the response.
94+
95+
<!-- {
96+
"blockType": "response",
97+
"truncated": true
98+
} -->
99+
```http
100+
HTTP/1.1 204 No Content
101+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account)|LifecycleWorkflows-Workflow.ReadWrite.All|LifecycleWorkflows.ReadWrite.All|
10+
|Delegated (personal Microsoft account)|Not supported.|Not supported.|
11+
|Application|LifecycleWorkflows-Workflow.ReadWrite.All|LifecycleWorkflows.ReadWrite.All|
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: "Automatically generated file. DO NOT MODIFY"
3+
ms.topic: include
4+
ms.localizationpriority: medium
5+
---
6+
7+
|Permission type|Least privileged permissions|Higher privileged permissions|
8+
|:---|:---|:---|
9+
|Delegated (work or school account)|LifecycleWorkflows-Workflow.ReadWrite.All|LifecycleWorkflows.ReadWrite.All|
10+
|Delegated (personal Microsoft account)|Not supported.|Not supported.|
11+
|Application|LifecycleWorkflows-Workflow.ReadWrite.All|LifecycleWorkflows.ReadWrite.All|
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "previewFailedTask resource type"
3+
description: "Represents a task that failed during a preview operation."
4+
author: "KristinaSmith"
5+
ms.localizationpriority: medium
6+
ms.subservice: "entra-id-governance"
7+
doc_type: resourcePageType
8+
ms.date: 02/26/2026
9+
---
10+
11+
# previewFailedTask resource type
12+
13+
Namespace: microsoft.graph.identityGovernance
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Represents a [task](../resources/identitygovernance-task.md) that failed during a preview operation of a [workflow](../resources/identitygovernance-workflow.md).
18+
19+
## Properties
20+
21+
|Property|Type|Description|
22+
|:---|:---|:---|
23+
|definitionId|String|The identifier of the task definition of the task that failed during the preview operation of a workflow.|
24+
|failureReason|String|The reason why the task failed in the preview operation of a workflow.|
25+
|name|String|The name of the task that failed within the preview operation of a workflow.|
26+
|taskId|String|The identifier of the task that failed during the preview operation of a workflow.|
27+
28+
## Relationships
29+
30+
None.
31+
32+
## JSON representation
33+
34+
The following JSON representation shows the resource type.
35+
<!-- {
36+
"blockType": "resource",
37+
"@odata.type": "microsoft.graph.identityGovernance.previewFailedTask"
38+
}
39+
-->
40+
``` json
41+
{
42+
"@odata.type": "#microsoft.graph.identityGovernance.previewFailedTask",
43+
"definitionId": "String",
44+
"failureReason": "String",
45+
"name": "String",
46+
"taskId": "String"
47+
}
48+
```

0 commit comments

Comments
 (0)