Skip to Content
Technical Articles
Author's profile photo Istvan Bokor

How to group employees based on their hireDate attribute via Identity Provisioning? 

How to group SAP SuccessFactors employees based on their hireDate attribute via Identity Provisioning into Identity Authentication user store?

The goal to achieve in this blog is to group SAP SuccessFactors employees based on their hireDate attribute. If the hire date is today or already passed, users should go to the ‘ExistingEmployees‘ group in Identity Authentication. If the hire date is further than today, the users should go to the ‘ToBeEmployees‘ group.

1. SAP SuccessFactors source system – Identity Provisioning

In Identity Provisioning, for SAP SuccessFactors source system add hireDate value to the sf.user.attributes property, so that Identity Provisioning will load (read) this user attribute from SAP SuccessFactors. Remember, the extra attribute has to be separated by a comma.

Add the following mapping to the SAP SuccessFactors source system transformation into the User part:

 {
"sourcePath": "$.hireDate",
"targetPath": "$.hireDate",
"functions": [
{
"function": "manipulateDate",
"sourceDateFormat": "Date(milliseconds)",
"targetDateFormat": "yyyy-MM-dd HH:mm:ss.SSS"
}
]
},

The manipulateDate function converts one date format into another after JSONPath transformations: In our case, it reads the given date in Unix Time Stamp format (in milliseconds) and writes the converted value in the target system as a standard Java date format. More info: Transformation Functions.

2. Identity Authentication target system – Identity Provisioning

Add the following mapping to the Identity Authentication target system transformation into the User part:

 {
"condition": "($.hireDate < '${currentDate}')",
"constant": "ExistingEmployees",
"targetPath": "$.groups[0].value"
},
{
"condition": "($.hireDate >= '${currentDate}')",
"constant": "ToBeEmployees",
"targetPath": "$.groups[0].value"
},

These mappings will assign the user groups to the users who are applying the given condition.

3. Identity Authentication

In Identity Authentication Administration Console, create the two user groups:

  • ExistingEmployees
  • ToBeEmployees

4. Identity Provisioning

Run a new Read job from Identity Provisioning from SAP SuccessFactors source system, and monitor in Identity Authentication that the employees are getting assigned to the desired groups.

I hope that this example will help you to discover grouping possibilities based on dates.

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah

      Great information and well described Istvan Bokor  !!

      Keep sharing more and more 🙂 .. since you're the only master of IAS and IPS !!

      Author's profile photo Istvan Bokor
      Istvan Bokor
      Blog Post Author

      Thank you for your kind words, Yoga 🙂

      Author's profile photo James Reidy
      James Reidy

      Fantastic piece of work Istvan 🙂

      Author's profile photo Istvan Bokor
      Istvan Bokor
      Blog Post Author

      Thank you, James 🙂

      Author's profile photo Shreyash Rangrej
      Shreyash Rangrej

      Hi Istvan Bokor

      Great blog post and very simplified explanation. I'm trying to achieve a scenario where I provision users from one SuccessFactors Dynamic group into another IAS user group. However, I'm unable to find any reference.

      I would really appreciate it if you could help me out with the scenario.

      Best Regards

      Shreyash

      Author's profile photo Rob Veenman
      Rob Veenman

      We have this scenario setup on our IPS and this worked fine for some time.

      However, since some time (dont know how long), it throws many errors in the IPS job log:

      error=com.sap.security.iag.provisioning.mapping.exceptions.InvalidTransformationException: Parameter is specified as variable, but there is no variable with name: currentDate.
      Caused by: com.sap.security.iag.provisioning.mapping.NotSuitableFunctionParameterValueException: Parameter is specified as variable, but there is no variable with name: currentDate.,

       

      Any idea why and how to prevent this?