Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST Connection- FULL IMPORT ACCOUNT JOB failure

midhunj
New Contributor
New Contributor

Hi Team,

We are developing a rest connector and able to successfully authenticate. We have the importacctentjson configured to import the acocunts and could see following error. 

Invalid record not processed. Error Message - null

The debug logs are also enabled and could see following error in logs,

midhunj_0-1712255671214.png

The following are the importacctentjson,

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "xxxxxxxxxxxxxxxx ",
"httpHeaders":
{
"Authorization": "${access_token}",
"accessToken": "xxxxxxxx"
},
"httpContentType": "application/json",
"httpMethod": "POST"
},
"listField": "status.data",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "username~#~char",
"name": "username~#~char",
"displayName": "pin_number~#~char",
"customproperty1": "id~#~char",
"customproperty2": "email~#~char",
"customproperty3": "first_name~#~char",
"customproperty4": "last_name~#~char",
"customproperty5": "timezone~#~char",
"status": "active~#~char",
"customproperty6": "role~#~char",
"customproperty7": "location~#~char",
"customproperty8": "type~#~char",
"customproperty9": "auto_assign~#~char",
"customproperty10": "departments~#~char",
"customproperty11": "status~#~char",
"customproperty12": "groups~#~char"
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "xxxxxxxxxxxxxxxxxxx ",
"httpHeaders":
{
"Authorization": "${access_token}",
"accessToken": "xxxxxxxxx"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "status.data.groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "groups~#~char",
"entitlement_value": "groups~#~char"
}
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Role": {
"entKeyField": "entitlementID",
"acctKeyField": "accountID",
"call": {
"call1": {
"processingType": "http",
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders":
{
"Authorization": "${access_token}",
"accessToken": "xxxxxxxxx"
},
"url": "xxxxxxxxxxxxxxx",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "status.data.groups",
"acctIdPath": "username",
"entIdPath": "groups",
"colsToPropsMap": {
"uuid": "sys_id~#~char"
}
}
}
}
}
}
}
}

The response from the postman is below,

{
    "status": {
        "error": "false",
        "code": "200",
        "type": "Success",
        "data": [
            {
                "id": "1250",
                "first_name": "Rome1234",
                "last_name": "Johnson123",
                "username": "Romson",
                "email": "101@domain.com",
                "pin_number": "192030",
                "timezone": "Europe/Berlin",
                "role": "Supervisor",
                "location": "Marinette WI",
                "type": "Signal",
                "auto_assign": "End",
                "status": "Active",
                "departments": [
                    "S&C"
                ],
                "groups": [
                    "30014",
                    "30140"
                ]
            },
            {
                "id": "1245",
                "first_name": "xxxx",
                "last_name": "XXXXX",
                "username": "153575",
                "email": "xxxx.xxxxx@domain.com",
                "pin_number": "153575",
                "timezone": "America/New_York",
                "role": "Employee",
                "location": "100",
                "type": "Tower Operators",
                "auto_assign": "Both",
                "status": "Active",
                "departments": [
                    "Dispatch"
                ],
                "groups": [
                    "Bridge Tenders & Tower Operators"
                ]
            },
 
The attributes mapping are done correctly in the JSON but still looking the error.
 
Attaching are the JSON * logs for reference. 
 
Any inputs would be really helpful.
 
Following is the account correlation rule & account name rule
midhunj_1-1712255937567.pngmidhunj_2-1712255965113.png

 

 

 

I see the error is because of the special characters in department field,

midhunj_0-1712264415287.png

the postman response for department is 

midhunj_1-1712264456897.png

How do we ignore the special characters while accounts & access import? we don't need it to be replaced because while creating the accounts we need to pass the exact department names.

[This post has been edited by a Moderator to merge two posts.]

 

I even tried using but still same error

cleanUpTextContent": true,

 

[This post has been edited by a Moderator to remove sensitive information.]

6 REPLIES 6

dgandhi
All-Star
All-Star

Does your import work if you remove the department field from your mapping?

 

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

rushikeshvartak
All-Star
All-Star

It seems you have issue with department attribute which contains & as special characters. 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

midhunj
New Contributor
New Contributor

Yes Rushi, How do we handle the special characters in import? We don't want to clear or replace the special character as we need to pass the exact department name with "&" while creating an account or else the create account will fail.

Use emchar instead of char data type


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Still we are seeing the same issue.

use CONST to replace & from response

Refer samples https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.