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

user import failure- REST Connection

NID27
Regular Contributor
Regular Contributor

Hi,

User import is failing with a msg: Error in Users Import - Error while processing data: Data truncation: Data too long for column 'USERNAME' at row 1

Import json below: Complete json is attached

"connection": "userAuth",
"url": "https://www.domain.com/Api/abc/V1/Employees?filterUpdatedStartDate=${(new Date()-2).format('yyyy-MM-dd\\'T\\'HH:mm:ss')}&filterUpdatedEndDate=${(new Date()).format('yyyy-MM-dd\\'T\\'HH:mm:ss')}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "XRefCode~#~char"
},
    "successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
403,
401,
404,
409,
501,
503,
500
]
},
"userResponsePath": "Data"
},
{
"name": "call2",
"connection": "userAuth",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
},
"statusConfig": {
"statusColumn": "customproperty54",
"active": [
"ACTIVE",
"LOACFRA",
"LOAFMLA",
"LOAMILITARY",
"LOANYPFL",
"LOAPDL",
"LOAPERSONAL",
"LOAWORKERSCOMP"
]
},
"colsToPropsMap": {
"username": "#CONST#${List responseList = response.SSOAccounts.Items; int size = responseList.size(); if (size == 0) {return response.EmployeeNumber} else {int count = 0; Iterator iterator = responseList.iterator(); while (iterator.hasNext()) { count++; Map dataMap = iterator.next(); if (count == size) {return dataMap.LoginName.substring(0, dataMap.LoginName.indexOf('@'))}}}}~#~char ",
 
 
I have tried changing the colsmap from username to a value with datatype "longtext" but it shows the "data long error".
 
Is there anyway to find the user causing the issue. I checked the logs but it doesn't mention much.
 
Thanks
Nidhi
 
[This post has been edited by a Moderator to remove sensitive information.]
1 REPLY 1

NM
Honored Contributor II
Honored Contributor II

Hi @NID27 share logs to analyse the error.

Is this a new implementation or existing?