Azure SCIM User Provision sending invalid time zone information for date fields

Egor Kolesnikov 0 Reputation points
2023-11-13T16:01:38.43+00:00

Depending on user time zone, fields like "employeeHireDate" are either stored or sent with invalid time zone over SCIM endpoint. Are there any settings in Entra ID to either enforce correct time zones or drop time portions for Date fields completely?

Context:

AD field employeeHireDate is mapped to extension joinDate field in target system.

Actual behaviour:

Me (European TZ, GMT+2) setting up employeeHireDate to "15 November 2023" in Entra ID UI

PatchOp:

{
  "Operations" : [ {
    "op" : "replace",
    "path" : "urn:ietf:params:scim:schemas:extension:acea:2.0:User:joinDate",
    "value" : "2023-11-14T22:00:00Z"
  } ]
}

Colleague (US TZ, GMT-5) setting up employeeHireDate to "15 November 2023"

PatchOp:

{
  "Operations" : [ {
    "op" : "replace",
    "path" : "urn:ietf:params:scim:schemas:extension:acea:2.0:User:joinDate",
    "value" : "2023-11-15T05:00:00Z"
  } ]
}

Both requests are coming through with invalid GMT+0 (Z) timezone which leads to incorrect behaviour in the target system.

Expected results:

PatchOp contains "2023-11-14T22:00:00+02:00" when value is changed by the EU user

PatchOp contains "2023-11-15T05:00:00-05:00" when value is changed by the US user

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,168 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Danny Zollner 9,536 Reputation points Microsoft Employee
    2023-11-13T17:46:03.7866667+00:00

    And this is the problem with using localized time zones in applications :) Using UTC across the board solves this..

    Anyways, you're likely looking for this function: https://learn.microsoft.com/en-us/entra/identity/app-provisioning/functions-for-customizing-application-data#formatdatetime

    You can use the formatDateTime function to define the formatting and drop the time portion, leaving only the date.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.