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

Trouble assigning proxyAddresses to CP on user import - Data truncation: Data too long

Brian
New Contributor III
New Contributor III

Hello!  We're importing users via REST connection from Azure.  I'm attempting to map all proxyAddresses to customproperty20, keeping only those that start with lowercase 'smtp:' and removing 'smtp:' from each string in the colsToPropsMap.  proxyAddresses is a top level item in the response:

 

 "customproperty20": "#CONST#${List responseList = response.proxyAddresses;List newList=[];for(int i=0;i<responseList.size();i++){if(responseList[i].startsWith('smtp:')){newList+=responseList[i].substring(responseList[i].lastIndexOf(':')+1,responseList[0].size());};};if(newList.size()>0){return newList};else{return null};}~#~listAsString"

 

 Sample response from Azure:

 

{
   "proxyAddresses": [
        "smtp:Test.User@companyglobal.onmicrosoft.com",
        "X500:/o=Company/ou=Users (ABCDEF25GHIJKL)/cn=Recipients/cn=1d99dcf989898989909090da99a99eb-Test User",
        "SMTP:Test.User@company.com",
        "X500:/o=Exchange/ou=Exchange Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=98989898989890a989898989e98989db9d-fffe2d2f-9b",
        "smtp:Test.User@companyglobal.mail.onmicrosoft.com",
        "smtp:Test.User1@company.com",
        "smtp:Test.User2@company.com",
        "smtp:Test.User3@company.com"
    ]
}

 

It appears Saviynt is trying to put the whole script into CP20 here, I get the following errors in the logs:

 

2024-02-13T08:04:30-06:00-ecm-worker-services.ImportSAvDataUserService-quartzScheduler_Worker-7-8khtd-DEBUG-Proceed to Import for records - > [Test.User@company.com, Test User, Test, User, null, null, true, Test.User@company.com, Member, null, [], tuser, e999a888-8abc-777d-666e-f66g555h44hi, tuser@company.com, 2021-08-06T19:26:27Z, ${List responseList = response.proxyAddresses;List newList=[];for(int i=0;i<responseList.size();i++){if(responseList[i].startsWith('smtp:')){newList+=responseList[i].substring(responseList[i].lastIndexOf(':')+1,responseList[0].size());};};if(newList.size()>0){return newList};else{return null};}, null] : true

2024-02-13T08:04:31-06:00-ecm-worker-util.JDBCExceptionReporter-quartzScheduler_Worker-7-8khtd-ERROR-Data truncation: Data too long for column 'CUSTOMPROPERTY20' at row 1

 

This post looks like a similar issue but there was no solution. 

https://forums.saviynt.com/t5/identity-governance/rest-importuserjson-data-too-long-for-column-error...

Anyone have any ideas?

2 REPLIES 2

Amit_Malik
Valued Contributor II
Valued Contributor II

HI @Brian , Try using cp56-60. I had a similar issue with one value in user import that was more than 255 characters, I have been using cp57 for that. These are long text attributes. 

Thanks , Amit

If helped , please Accept Solution to close thread and help others know it worked.

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

Brian
New Contributor III
New Contributor III

Thanks @Amit_Malik , that was it!  I was validating with a couple users who with all proxyAddresses combined did not reach the 250 character limit for cp20 and was still expecting to see data for those individuals in cp20.  After changing it to cp60, all of the data showing as expected. 

Here's the final version if it helps anyone in the future(I had a small bug in the script in my initial post, and I wanted the output to not include the opening and closing brackets [] 😞

"customproperty60": "#CONST#${List responseList = response.proxyAddresses;List newList=[];for(int i=0;i<responseList.size();i++){if(responseList[i].startsWith('smtp:')){newList+=responseList[i].substring(responseList[i].lastIndexOf(':')+1,responseList[i].size());};};if(newList.size()>0){return newList.join(', ')};else{return null};}~#~char"