Get deletedItemContainer (a deleted lifecycle workflow)

Namespace: microsoft.graph.identityGovernance

Retrieve a deleted workflow object.

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

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. Global Reader and Lifecycle Workflows Administrator are the least privileged roles supported for this operation.

HTTP request

GET /identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflowId}/

Optional query parameters

This method supports the $select and $expand OData query parameters to help customize the response. For general information, see OData query parameters.

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 method returns a 200 OK response code and a collection of microsoft.graph.identityGovernance.workflow objects in the response body.

Examples

Example 1: Get a deleted workflow

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/identityGovernance/lifecycleWorkflows/deletedItems/workflows/4557805a-1af5-4c29-b271-2cd7fb5de9bf

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/deletedItems/workflows/$entity",
    "category": "joiner",
    "description": "Configure new hire tasks for onboarding employees on their first day",
    "displayName": "Australia Onboard new hire employee",
    "lastModifiedDateTime": "2022-08-24T19:06:39.4291388Z",
    "createdDateTime": "2022-08-24T19:06:07.9926094Z",
    "deletedDateTime": "2022-08-24T19:06:39.6981917Z",
    "id": "4557805a-1af5-4c29-b271-2cd7fb5de9bf",
    "isEnabled": false,
    "isSchedulingEnabled": false,
    "nextScheduleRunDateTime": null,
    "version": 1,
    "executionConditions": {
        "@odata.type": "#microsoft.graph.identityGovernance.triggerAndScopeBasedConditions",
        "scope": {
            "@odata.type": "#microsoft.graph.identityGovernance.ruleBasedSubjectSet",
            "rule": "(country eq 'Australia')"
        },
        "trigger": {
            "@odata.type": "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger",
            "timeBasedAttribute": "employeeHireDate",
            "offsetInDays": 0
        }
    },
    "lastModifiedBy": {
        "id": "537b3620-fab7-435e-81bb-03fee751b789"
    },
    "tasks@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/deletedItems/workflows('4557805a-1af5-4c29-b271-2cd7fb5de9bf')/tasks",
    "tasks": [],
    "createdBy": {
        "id": "537b3620-fab7-435e-81bb-03fee751b789"
    }
}

Example 2: Get specific properties of a deleted workflow

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/identityGovernance/lifecycleWorkflows/deletedItems/workflows/952b23c5-cc25-48c9-8848-95da4dd9dc6d?$select=id,category,displayName,description,version,executionConditions

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/deletedItems/workflows(id,category,displayName,description,version,executionConditions,tasks())/$entity",
    "category": "leaver",
    "description": "Employee offboarding for Contoso Germany.",
    "displayName": "Germany offboard employees",
    "id": "952b23c5-cc25-48c9-8848-95da4dd9dc6d",
    "version": 4,
    "executionConditions": {
        "@odata.type": "#microsoft.graph.identityGovernance.triggerAndScopeBasedConditions",
        "scope": {
            "@odata.type": "#microsoft.graph.identityGovernance.ruleBasedSubjectSet",
            "rule": "(startsWith(employeeType, 'member'))"
        },
        "trigger": {
            "@odata.type": "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger",
            "timeBasedAttribute": "employeeLeaveDateTime",
            "offsetInDays": -7
        }
    },
    "tasks@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/deletedItems/workflows('952b23c5-cc25-48c9-8848-95da4dd9dc6d')/tasks",
    "tasks": []
}