Understanding lifecycle workflows

The following reference document provides an overview of a workflow created using Lifecycle Workflows. Lifecycle Workflows allow you to create workflows that automate common tasks associated with user lifecycle in organizations. Lifecycle Workflows automate tasks based on the joiner-mover-leaver cycle of lifecycle management, and splits tasks for users up into categories of where they are in the lifecycle of an organization. These categories extend into templates where they can be quickly customized to suit the needs of users in your organization. For more information, see: What are Lifecycle Workflows?.

Diagram of a lifecycle workflow

Licenses and Permissions

Using this feature requires Azure AD Premium P2 licenses. To find the right license for your requirements, see Compare generally available features of Azure AD.

Parameter Display String Description Admin Consent Required
LifecycleWorkflows.Read.All Read all lifecycle workflows and tasks. Allows the app to list and read all workflows and tasks related to lifecycle workflows on behalf of the signed-in user. Yes
LifecycleWorkflows.ReadWrite.All Read and write all lifecycle workflows and tasks. Allows the app to create, update, list, read and delete all workflows and tasks related to lifecycle workflows on behalf of the signed-in user. Yes

Parts of a workflow

A workflow can be broken down in to the following three main parts.

Workflow part Description
General information This portion of a workflow covers basic information such as display name and a description of what the workflow does.
Tasks Tasks are the actions that will be taken when a workflow is executed.
Execution conditions The execution condition section of a workflow sets up

- Who(scope) the workflow runs against

- When(trigger) the workflow runs

Templates

Creating a workflow via the portal requires the use of a template. A Lifecycle Workflow template is a framework that is used for pre-defined tasks and helps automate the creation of a workflow.

Understanding workflow template diagram.

The template will define the task that is to be used and then guide you through the creation of the workflow. The template provides input for description information and execution condition information.

Note

Depending on the template you select, the options that will be available may vary. This document uses the Onboarding pre-hire employee template to illustrate the parts of a workflow.

For more information, see Lifecycle workflow templates.

Workflow basics

After selecting a template, on the basics screen:

  • Provide the information that will be used in the description portion of the workflow.
  • The trigger, defines when of the execution condition.

Basics of a workflow.

Workflow details

Under the workflow details section, you can provide the following information:

Name Description
Name The name of the workflow.
Description A brief description that describes the workflow.

Trigger details

Under the trigger details section, you can provide the following information.

Name Description
Days for event The number of days before or after the date specified in the Event user attribute.

This section defines when the workflow will run. Currently, there are two supported types of triggers:

  • Trigger and scope based - runs the task on all users in scope once the workflow is triggered.
  • On-demand - can be run immediately. Typically used for real-time employee terminations.

Configure scope

After you define the basics tab, on the configure scope screen:

  • Provide the information that will be used in the execution condition, to determine who the workflow will run against.
  • Add more expressions to create more complex filtering.

The configure scope section determines who the workflow will run against.

Screenshot showing the rule section

You can add extra expressions using And/Or to create complex conditionals, and apply the workflow more granularly across your organization.

Extra expressions.

Note

For a full list of user properties supported by Lifecycle Workflows, see Supported user properties and query parameters

For more information, see Create a lifecycle workflow.

Review tasks

After defining the scope the review tasks screen will allow you to:

  • Verify that the correct template was selected, and the tasks associated with the workflow are correct.
  • Add more tasks other than the ones in the template.

Screenshot showing the review tasks screen.

You can use the Add task button to add extra tasks for the workflow. Select the additional tasks from the list provided.

Screenshot showing additional tasks section.

For more information, see: Lifecycle workflow tasks

Review and create

After reviewing the tasks on the review and create screen, you:

  • Verify all of the information is correct, and create the workflow.

Based on what was defined in the previous sections our workflow will now show:

  • It's named on-board pre-hire employee.
  • Based on the date in the EmployeeHireDate attribute, it will trigger seven (7) days prior to the date.
  • It will run against users who have marketing for the department attribute value.
  • It will generate a TAP (temporary access password), and send an email to the user in the manager attribute of the pre-hire employee.

Review and create workflow template.

Scheduling

A workflow isn't scheduled to run by default. To enable the workflow, it needs to be scheduled.

To verify whether the workflow is scheduled, you can view the Scheduled column.

To enable the workflow, select the Enable schedule option for the workflow.

Once scheduled, the workflow will be evaluated every 3 hours to determine whether or not it should run based on the execution conditions.

Workflow template schedule.

On-demand scheduling

A workflow can be run on-demand for testing or in situations where it's required.

Use the Run on demand feature to execute the workflow immediately. The workflow must be enabled before you can run it on demand.

Note

A workflow that is run on demand for any user does not take into account whether or not a user meets the workflow's execution. It will apply the task regardless of whether the execution conditions are met or not.

For more information, see Run a workflow on-demand

Managing the workflow

By selecting on a workflow you created, you can manage the workflow.

You can select which portion of the workflow you wish to update or change using the left navigation bar. Select the section you wish to update.

Update manage workflow section review.

For more information, see Manage lifecycle workflow properties

Versioning

Workflow versions are separate workflows built using the same information of an original workflow, but with updated parameters so that they're reported differently within logs. Workflow versions can change the actions or even scope of an existing workflow.

You can view versioning information by selecting Versions under Manage from the left.

Manage workflow versioning selection.

For more information, see Lifecycle Workflow versioning

Developer information

This document covers the parts of a lifecycle workflow

For more information, see the Workflow API Reference

Next steps