Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
istvanbokor
Advisor
Advisor
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.
10 Comments
yogananda
Product and Topic Expert
Product and Topic Expert
Great information and well described istvan.bokor  !!

Keep sharing more and more 🙂 .. since you're the only master of IAS and IPS !!
istvanbokor
Advisor
Advisor
Thank you for your kind words, Yoga 🙂
James_Reidy
Advisor
Advisor
Fantastic piece of work Istvan 🙂
istvanbokor
Advisor
Advisor
0 Kudos
Thank you, James 🙂
shreyashrangrej
Participant
0 Kudos

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

robveenman
Explorer
0 Kudos
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?
Mladen
Explorer
0 Kudos
Hi,

we have same error when user appear first time in the source system. When user provisinong is run for the second time, error dissapear.

Did you find a way how to eliminate error?
robveenman
Explorer
0 Kudos

Update:
I raised a support case and the currentDate is issue is rectified by SAP Support since mid January 2024. 

dsouzadylan44
Explorer
0 Kudos

Hi @shreyashrangrej 

Were you able to figure out how to do that? I have a similar requirement

oma7
Newcomer
0 Kudos

Hi, @istvanbokor.

It is valuable information.
I have a question, what is the scenario where they request that SF automatically create a user in IAS when an employee is hired?

Is it possible?

Regards.