Szerkesztés

Megosztás a következőn keresztül:


List workflows

Namespace: microsoft.graph.identityGovernance

Get a list of workflow resources that are associated with lifecycle workflows.

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

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/workflows

Optional query parameters

This method supports the $search, $orderby, and $filter OData query parameters to help customize the response. $expand is supported by the createdBy and lastModifiedBy relationships only. 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: Retrieve all workflows created in the tenant

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/identityGovernance/lifecycleWorkflows/workflows

Response

The following example shows the response.

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

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/workflows",
    "value": [
        {
            "category": "joiner",
            "description": "Configure pre-hire tasks for onboarding employees before their first day",
            "displayName": "Global pre hire",
            "lastModifiedDateTime": "2022-08-16T20:05:51.4618603Z",
            "createdDateTime": "2022-01-10T20:04:30.619368Z",
            "id": "c007a148-5bf1-4f38-82b4-377fb23b1711",
            "isEnabled": true,
            "isSchedulingEnabled": true,
            "version": 12
        },
        {
            "category": "joiner",
            "description": "Configure new hire tasks for onboarding employees on their first day",
            "displayName": "Global new hire",
            "lastModifiedDateTime": "2022-08-18T17:24:42.6051254Z",
            "createdDateTime": "2022-05-06T14:10:39.9700268Z",
            "id": "559d8339-ab4e-4c41-a517-ed5d8dd9fbf5",
            "isEnabled": true,
            "isSchedulingEnabled": true,
            "version": 5
        },
        {
            "category": "joiner",
            "description": "Configure pre-hire tasks for onboarding employees before their first day",
            "displayName": "Onboard pre-hire employee",
            "lastModifiedDateTime": "2022-08-16T20:01:28.3589067Z",
            "createdDateTime": "2022-08-16T17:48:55.2262907Z",
            "id": "d0454160-b8e9-432f-8a85-790021e64c9e",
            "isEnabled": false,
            "isSchedulingEnabled": false,
            "version": 1
        },
        {
            "category": "leaver",
            "description": "Configure offboarding tasks for employees after their last day of work",
            "displayName": "Post-Offboarding of an employee",
            "lastModifiedDateTime": "2022-08-17T18:57:30.5091553Z",
            "createdDateTime": "2022-08-17T18:57:07.1840042Z",
            "id": "15f9c6db-ada8-4417-927f-17ac24b54b9b",
            "isEnabled": true,
            "isSchedulingEnabled": false,
            "version": 1
        },
        {
            "category": "leaver",
            "description": "Execute real-time termination tasks for employees on their last day of work",
            "displayName": "Real-time employee termination",
            "lastModifiedDateTime": "2022-08-19T20:34:15.4212506Z",
            "createdDateTime": "2022-08-19T20:34:15.4212481Z",
            "id": "57bc6612-2c20-4141-9dab-aa11a95b8fbc",
            "isEnabled": true,
            "isSchedulingEnabled": false,
            "version": 1
        },
        {
            "category": "joiner",
            "description": "Configure new hire tasks for onboarding employees on their first day",
            "displayName": "Onboard new hire employee",
            "lastModifiedDateTime": "2022-08-24T15:39:17.6496744Z",
            "createdDateTime": "2022-08-24T15:39:17.6496704Z",
            "id": "156ce798-1eb6-4e0a-8515-e79f54d04390",
            "isEnabled": true,
            "isSchedulingEnabled": false,
            "version": 1
        }
    ]
}

Example 2: Retrieve only specific properties of "leaver" workflows

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/identityGovernance/lifecycleWorkflows/workflows?$filter=category eq 'leaver'&$select=id,category,displayName,isEnabled,isSchedulingEnabled

Response

The following example shows the response.

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

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/workflows(category,displayName,isEnabled,isSchedulingEnabled)",
    "value": [
        {
            "category": "leaver",
            "displayName": "Pre-Offboarding employees in the R&D department",
            "id": "c0548e6c-8849-46e8-be14-8b6d2b04957e",
            "isEnabled": true,
            "isSchedulingEnabled": true
        }
    ]
}