none
Mapping of Current Date/Time Values Within a Synchronization Rule RRS feed

  • Question

  • Do any of you guys know if there is a way to capture the current date/time (timestamp) within a synchronization rule to set the value of an attribute? Something similar to assigning a default value to an attribute using the string or number mapping. There is a function called DateTimeFormat, but I am looking for something that would return Date and Time even if in string format.

    I am current running MIM 2016 SP1.



    Thursday, July 6, 2017 4:19 PM

All replies

  • Seems you know the answer, just do

    DateTime.Now.ToString()


    Nosh Mernacaj, Identity Management Specialist


    Thursday, July 6, 2017 5:21 PM
  • Thank you! I am pretty new to this product, so I am still trying to make sense of a few things. Is your suggestion documented somewhere I can take a look at and see what other functions and library calls are available?


    Just a clarification, I am trying to accomplish what I described in my original post as a declarative/portal rule and not a classic rule.

    Thursday, July 6, 2017 6:37 PM
  • In Metaverse, where all imported data first lands, there is no datatype for date, so it is automatically stored as a string.


    Nosh Mernacaj, Identity Management Specialist

    Friday, July 7, 2017 1:38 AM
  • That won't work in a sync rule, just in a coded rule.

    Thanks,
    Brian

    Consulting | Blog | AD Book

    Saturday, July 8, 2017 4:22 PM
    Moderator
  • Celso-

    There isn't any function to generate the current date/time in a sync rule. Depending on what you want to do, generating this in advance with a workflow and then flowing the attribute you set with the workflow could be an option.

    Your other alternative is to do an advanced flow rule which you would build in C#/VB. You'll want to be careful that you write it such that it doesn't overwrite the value after it's set or you'll get a new timestamp everytime a sync runs on that object.


    Thanks,
    Brian

    Consulting | Blog | AD Book

    Saturday, July 8, 2017 4:25 PM
    Moderator