Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

IMPORTUSERJSON REST CONNECTON ColstoPropsMaps #CONST#

Huddos
Regular Contributor
Regular Contributor

Hi,

A user was imported from our HR API connection the other day with a username of: 

${Calendar c=Calendar.getInstance();if((c.getTimeInMillis()+(7*86400000))>=Date.parse("yyyy-MM-dd",response.start_date).getTime()){return response.payroll_id;}}

It's the first time it has occured, 5 months have past since go live. Config is below, any ideas of why this may have occured?

 

TIA

{
"connection": "userAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://URL?limit=50&page=1",
"httpMethod": "GET",
"httpHeaders": {
"app_key": "ddd",
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "#CONST#${Calendar c=Calendar.getInstance();if((c.getTimeInMillis()+(7*86400000))>=Date.parse(\"yyyy-MM-dd\",response.start_date).getTime()){return response.payroll_id;}}~#~char",
"systemUserName": "payroll_id~#~char",
"firstname": "first_name~#~char",
"displayname": "#CONST#${response.preferred_name ? response.surname+', '+response.preferred_name : response.surname+', '+response.first_name}~#~char",
"preferedFirstName": "preferred_name~#~char",
"middlename": "middle_name~#~char",
"lastname": "surname~#~char",
"employeeid": "#CONST#${Calendar c=Calendar.getInstance();if((c.getTimeInMillis()+(7*86400000))>=Date.parse(\"yyyy-MM-dd\",response.start_date).getTime()){return response.payroll_id;}}~#~char",
"title": "title~#~char",
"customproperty1": "primary_payroll_id~#~char",
"startdate": "start_date~#~char",
"termDate": "termination_date~#~char",
"employeeType": "#CONST#${((response.occupancy[0].employee_status_code=='ZZ')?'Consultant': ((response.occupancy[0].employee_status_code=='SP')?'Third Party':'City Employee'))}~#~char",
"companyname": "#CONST#Company Name~#~char",
"jobCode": "occupancy[0].position.position_id~#~char",
"jobCodedesc": "occupancy[0].position.position_title~#~char",
"customproperty24": "terminated~#~char",
"manager": "line_leader[0].payroll_id~#~char",
"customproperty2": "occupancy[0].employee_status_code~#~char",
"customproperty3": "occupancy[0].employee_status~#~char",
"customproperty12": "work_phone~#~char",
"phonenumber": "mobile~#~char",
"customproperty4": "termination_reason_code~#~char",
"costcenter": "Orgstructure.cost_centre_code~#~char",
"customproperty5": "Orgstructure.cost_centre~#~char",
"departmentNumber": "Orgstructure.directorate_code~#~char",
"departmentname": "Orgstructure.directorate~#~char",
"customproperty6": "Orgstructure.branch_code~#~char",
"customproperty7": "Orgstructure.branch~#~char",
"customproperty10": "Orgstructure.section~#~char",
"customproperty11": "Orgstructure.section_code~#~char",
"customproperty13": "Orgstructure.subsection~#~char",
"customproperty16": "classification_code~#~char",
"customproperty17": "delegation[0].position_id~#~char",
"customproperty19": "line_leader[0].position_id~#~char",
"customproperty20": "leave_approver[0].payroll_id~#~char",
"customproperty21": "occupancy[0].position.position_status_code~#~char",
"customproperty22": "occupancy[0].position.position_status~#~char",
"customproperty8": "current~#~char",
"customproperty9": "new~#~char",
"doNotDisturbDelegate": "NULL~#~char",
"location": "area~#~char",
"locationnumber": "area_code~#~char",
"customproperty18": "delegation[0].payroll_id~#~char"
},
"statusConfig": {
"active": "false",
"inactive": "true"
},
"userResponsePath": "employees",
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.objectList?.size()>0?'https://URL?limit=50&page='+Math.addExact(response.completeResponseMap.pagination.current_page,1):nu...}"
}
}
}

 

 

 

 

 

3 REPLIES 3

NM
Honored Contributor II
Honored Contributor II

Hi @Huddos , is the response_startdate empty or not in the format to be used in the function which you have defined?

As it couldn't resolve the script.

Huddos
Regular Contributor
Regular Contributor

Hi NM, 

Each user has a startdate from a dump I have taken of users exposed in HR API. So your saying potentially there may be an invalid date causing it to return incorrect information?

Update: All dates are valid in start_date

Print start date in one of the customproperty and validate format or null check


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.