Microsoft Entra ID Governance
Governance

Lifecycle Workflow Execution Conditions

In brief

The documentation now describes Equal to, Between, and Within operators, offsets from 0 through 365 days, and UTC-based date evaluation. Directory Extension DateTime attributes can also appear as event attributes.

What Entra admins need to know

Administrators should account for UTC day boundaries when configuring workflows across time zones.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

  • Trigger: Defines the conditions for when a workflow runs for users.
  • Scope: Defines which users the workflow runs for.

The trigger you choose depends on what type of workflow you want to run for users, and the scope you choose is based on the trigger selected. There are currently four types of triggers supported:

:::image type="content" source="media/lifecycle-workflow-execution-conditions/trigger-details.png" alt-text="Screenshot of the trigger details section of a workflow's execution conditions." lightbox="media/lifecycle-workflow-execution-conditions/trigger-details.png":::

There are a number of triggers supported, some only available for certain workflow templates:

  • Time based attribute: The workflow is triggered on schedule when a user's date attribute meets an exact offset or a relative time value is met.range.
  • Attribute changes: The workflow is triggered on schedule when a change to an attribute happens.
  • Group membership change: The workflow is triggered on schedule when a group membership change is met.
  • Sign-in activity: The workflow is triggered on schedule when a minimum number of days since the user last signed in is met.
  • On-demand only: The workflow is only triggered manually.

Time based attribute trigger

The timeTime based attribute trigger allows you to setruns a triggerworkflow based on whena date attribute for each user. You can match an exact number of days before or after the date, a range of days, or a maximum number of days. For example, you can configure a workflow to run seven days before a user's hire date or match users whose hire date was within the past seven days.

For this trigger, event attributes specify a date, not a time value is met.of day. The trigger matches dates in Coordinated Universal Time (UTC). A matching day starts at 00:00 UTC, and users who also meet the scope rules fall into scope at the first scheduled evaluation on that day.

When you create or edit a workflow, select Time based attribute under Trigger details, and configure the following fields:

Trigger detail Description
Operator Select Equal to to match a single day offset, Between to match a range of offsets, or Within to match offsets up to a specified number of days.
Days from event Enter the number of days relative to the event attribute date, from 0 through 365.
Days to event When you select Between, enter the other end of the range, from 0 through 365 days.
Event timing Select Before or After to apply the offset or range before or after the event attribute date. All date comparisons use UTC. To match the event date itself, select Equal to, enter 0 in Days from event, and select On.
Event attribute Select the user date attribute to evaluate. employeeHireDate, employeeLeaveDateTime, and createdDateTime will always appear as options. If the tenant contains any Directory Extension attributes (must be specified as type DateTime), these will appear in the dropdown as well.

Time-based attribute rules can be complex, especially when you use the Between operator. Select View Rule Syntax to see the Microsoft Graph filter query that the Lifecycle workflows service runs to evaluate the rule.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/time-based-trigger.view-rule-syntax.png" alt-text="Screenshot of the time based workflow trigger.attribute trigger details with the View rule syntax button highlighted." lightbox="media/lifecycle-workflow-execution-conditions/view-rule-syntax.png":::

Time-based comparison examples

When setting a workflow whereThe following examples use employeeHireDate as the trigger type is Time based attribute,event attribute. All dates and day offsets are evaluated in UTC, not the following details are defined:user's local time zone. Users must also meet the workflow's scope rules to be processed.

Trigger detailScenario DescriptionOperatorDays from eventDays to eventEvent timingRule Syntax
Days from EventRun seven days before the user's hire date. The days from the event user attribute for when the workflow is triggered. Value can be from 0-180.Equal to7N/ABeforeemployeeHireDate eq (system.now plus P7D)
Event timingDefines when the Days from Event detail for a workflow is triggered. For example, a workflow that is scheduled to run for a user before they start working would have an event timing value of Before, while a workflow scheduled to run for a user after they leave your organization would have an event timing value of After. If selecting a template for a workflow that runsRun on the same day as the event user attribute, the value is 's hire date.Equal to0N/AOn.employeeHireDate eq system.now
Event user attributeMatch users whose hire date was between one and seven days ago. The attribute defining the change that triggers the workflow. The type of workflow being used determines the attributes available. A joiner workflow can have the attribute value of "Between17AfteremployeeHireDate" or "createdDateTime", while a leaver workflow has an attribute value of "employeeLeaveDate". For a list of templates, ge (system.now minus P7D) and their event user attributes, see: Lifecycle Workflows templates and categories. You are also able to set custom attribute triggers. For more information, see Use Custom Attribute Triggers in Lifecycle Workflows (Preview).

Relative time-based comparisons (preview)

The preview experience expands the time-based attribute trigger with relative comparisons. It includes the functionality of the standard time-based option and can also match users across a relative period. To configure these comparisons in a new or existing workflow, open Lifecycle Workflows in the Microsoft Entra admin center, and then select Time based attribute V2 (Preview) under Trigger details.

Configure the following trigger timing details:

Trigger detailDescription
OperatorSelect Exactly, Between, or Less than or equal to.employeeHireDate le (system.now minus P1D)
Days from eventMatch users whose hire date was no more than seven days ago. Enter an offset from 0 through 365 days. When you select BetweenWithin, also enter an offset from 0 through 365 days in Days to event.
Event timing Select Before or 7N/AAfter the event attribute date. To use the standard time-based behavior on the attribute date, select Exactly, enter 0 days,employeeHireDate ge (system.now minus P7D) and select On.
Event attributeSelect any user attribute supported by the time-based trigger, including employeeHireDate, employeeLeaveDateTime, and createdDateTime. le system.now

After configuring the trigger, continue through Configure scope, Review tasks, and Review + create. The workflow and its schedule must both be enabled for the trigger to be evaluated.

Workflow At each scheduled evaluation, scheduling,the workflow checks whether users meet the configured comparison and processing work the same for both preview choices, except the Time based attribute V2 (Preview) choice doesn't have a three-day catch-up window. Workflows created during preview transition to the unified generally available experience without reconfiguration. Microsoft communicates any schema changes in advance.scope. For details, see Workflow scheduling.

Time based attribute scope

The time based attribute scope allows you to define for whom the workflow runs when the time trigger is met.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/time-based-scope.png" alt-text="Screenshot of the scope screen for time based attribute trigger." lightbox="media/lifecycle-workflow-execution-conditions/time-based-scope.png":::

When setting the scope of the time based attribute trigger, the following details are defined:

The Attribute change trigger allows you to set a trigger based on when an attribute changes for users.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/attribute-changes-trigger.png" alt-text="Screenshot of the attribute changes trigger for a workflow." lightbox="media/lifecycle-workflow-execution-conditions/attribute-changes-trigger.png":::

When setting a workflow where the trigger type is Attribute change, the following details are defined:

For workflows that are triggered based on a group membership change, the workflow runs on a schedule when a user is added to, or removed from, a group.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/group-membership-trigger.png" alt-text="Screenshot of the group membership change trigger." lightbox="media/lifecycle-workflow-execution-conditions/group-membership-trigger.png":::

When setting a workflow where the trigger type is Group membership change, the following details are defined:

The group membership change scope allows you to define for whom the workflow runs when the group membership change trigger is met.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/group-membership-scope.png" alt-text="Screenshot of setting scope for group membership change." lightbox="media/lifecycle-workflow-execution-conditions/group-membership-scope.png":::

When setting the scope of the group membership change trigger, the following details are defined:

The Sign-in inactivity trigger allows you to set a trigger based on when a certain number of days has passed since the user last signed in.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/sign-in-inactivity-trigger.png" alt-text="Screenshot of the sign-in inactivity trigger." lightbox="media/lifecycle-workflow-execution-conditions/sign-in-inactivity-trigger.png":::

When setting the scope of the sign-in inactivity trigger, the following details are defined:

The On-demand only trigger is set to run the workflow for users you manually select. Workflows with these triggers don't run on a schedule. The users are selected within the scope details section of the workflow.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/on-demand-select-users.png" alt-text="Screenshot of selecting users for manual workflow execution." lightbox="media/lifecycle-workflow-execution-conditions/on-demand-select-users.png":::

When setting a workflow where the trigger type is On-demand only, the following details are defined:

After the execution conditions are set for an enabled workflow, you're able to see a list of users who currently meet its execution conditions. This user list is made up of users who the workflow runs for the next time it executes, and is based on the last time the workflow engine evaluated users within your tenant.

:::image type="content" source="media/lifecycle-workflow-execution-conditions/execution-user-scope.png" alt-text="Screenshot of a list of users in scope of the workflow's execution conditions." lightbox="media/lifecycle-workflow-execution-conditions/execution-user-scope.png":::

If the execution conditions recently changed for the workflow, then the execution user scope list might not be current. When the execution conditions are recently changed, the list refreshes with users meeting the latest execution conditions after the workflow engine evaluates the users again. Before the workflow runs for the users, it also checks to make sure the list of users still meet the current execution conditions.

Lifecycle workflow catch-up window

By design, LifecycleNew workflows provide a three that use the updated Time based attribute trigger don't have an automatic three-day catch catch-up windowwindow. Existing workflows aren't affected by this change and retain their current catch-up behavior.

For new workflows that use Equal to help customers process, users are eligible only on the UTC calendar day that could have been missed due to delays in HR user data updates.matches the configured offset. This meansmatching day isn't an additional catch-up window. Users must meet both the time-based comparison and scope rules when the workflow engine evaluates usersthem. If a user's data becomes available after that meetUTC day ends, the current execution conditionsworkflow doesn't process that user for the scheduled workflow, it includesmissed offset.

To allow for delays in user data updates, configure Between or Within to match a period that meets your requirements. For example, use Within, 7 days, and After with employeeHireDate to match users for whomwhose hire date was within the expected trigger date has already passed but wasn't more than three days past the original trigger date. Once the userseven days. This period is processed, it would only be considered again if there was a change for the user or workflows that allowed it to meet the execution conditions again.

The following table shows examples of Lifecycle Workflows' catch-up window:

Workflow ScenarioUser DataLifecycle workflow behavior
A pre-hire template workflow is scheduled to run for users 7 days before their EmployeeHireDate.A user is provisioned by HR in Microsoft Entra ID with an EmployeeHireDate in 10 days.The workflow runs for the new user as the date is before the offset.
A pre-hire template workflow is scheduled to run for users 7 days before their EmployeeHireDate.A new user is provisioned by HR in Microsoft Entra ID with an EmployeeHireDate in 5 days.The workflow runs for the new user as the date is within 3 dayspart of the offset.
A pre-hire template workflow is scheduled to run for users 7 days before their EmployeeHireDate.A new user is provisioned by HR in Microsoft Entra ID withtrigger configuration, not an EmployeeHireDate in 3 days.The workflow does not run for the new user, as the date is more than 3 days from the offset.
A new hire workflow runs on Feb 23 for in scope users with EmployeeHireDate of Feb 23.A new user is provisioned by HR in Microsoft Entra ID on Feb 24 with an EmployeeHireDate set as Feb 23.The workflow runs again on Feb 24 for the new user, as the date is within 3 days of the offset.
additional catch-up window.

Workflow scheduling

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…