workflow: restore

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.

Restore a workflow that has been deleted. You can only restore a workflow that was deleted within the last 30 days before Microsoft Entra ID automatically permanently deletes it.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

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.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application LifecycleWorkflows.ReadWrite.All Not available.

For delegated scenarios, the admin needs at least the Lifecycle Workflows Administrator Microsoft Entra role.

HTTP request

POST /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflowId}/restore

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this action returns a 200 OK response code and a microsoft.graph.identityGovernance.workflow in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/deletedItems/workflows/4c9c57b9-e1e9-4bed-a936-4fad9d8f5638/restore

Response

The following example shows the response.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#workflow",
    "@odata.type": "#microsoft.graph.identityGovernance.workflow",
    "category": "joiner",
    "description": "Configure new hire tasks for onboarding employees on their first day",
    "displayName": "Australia Onboard new hire employee",
    "lastModifiedDateTime": "2022-08-24T18:51:29.4301671Z",
    "createdDateTime": "2022-08-24T18:30:33.1050022Z",
    "deletedDateTime": null,
    "id": "4c9c57b9-e1e9-4bed-a936-4fad9d8f5638",
    "isEnabled": true,
    "isSchedulingEnabled": false,
    "nextScheduleRunDateTime": null,
    "version": 1,
    "executionConditions": null,
    "lastModifiedBy": {
        "id": "537b3620-fab7-435e-81bb-03fee751b789"
    },
    "tasks@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/deletedItems/workflows('4c9c57b9-e1e9-4bed-a936-4fad9d8f5638')('4c9c57b9-e1e9-4bed-a936-4fad9d8f5638')/tasks",
    "tasks": [],
    "createdBy": {
        "id": "537b3620-fab7-435e-81bb-03fee751b789"
    }
}