Configure the employeeLeaveDateTime property for a user

This article describes how to configure the employeeLeaveDateTime attribute for a user. This property can be used as a trigger for "leaver" workflows created using Lifecycle Workflows.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) User.Read.All and User-LifeCycleInfo.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application User.Read.All and User-LifeCycleInfo.ReadWrite.All

For delegated scenarios, the admin must also have the Global Administrator Azure AD role.

Request

The following example shows a user who will leave on September 30, 2022 at 23:59.

PATCH https://graph.microsoft.com/beta/users/df744d9e-2148-4922-88a8-633896c1e929

{
    "employeeLeaveDateTime": "2022-09-30T23:59:59Z"
}

Next steps