Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

How can i handle array in response?

MJ
New Contributor III
New Contributor III

i am trying to integrate the new app using REST connector.

I got 1 issue for importing account from app.

there are 2 arrays in the response.

here is the response sample for importaccountjson.

 

{
"users": [
[
{
"firstName": "James",
"lastName": "O",
"displayName": "James O",
"username": "james_c",
"email": "james_c@c.com",
"createdAt": "2018-05-23T19:56:39Z",
"passwordLastUpdated": "2018-05-23T19:56:39Z",
"verified": true,
"_selfUrl": "/api-public/v1/user/james_c"
},
{
"firstName": "Jeff",
"lastName": "G",
"displayName": "Jeff G",
"username": "jeff.g",
"email": "jeff.gu@c.com",
"createdAt": "2018-09-13T22:46:53Z",
"passwordLastUpdated": "2019-07-09T01:11:16Z",
"verified": true,
"_selfUrl": "/api-public/v1/user/jeff.gu"
},
....................................
{
"firstName": "Henry",
"lastName": "K",
"displayName": "Henry K",
"username": "mikim814.c",
"email": "mikim814@c.com",
"createdAt": "2023-01-19T08:51:40Z",
"passwordLastUpdated": "2023-01-19T09:07:26Z",
"verified": true,
"_selfUrl": "/api-public/v1/user/mikim814.c"
}
]
]
}

so the result of the import is the following :

MJ_0-1674628248930.png

I hope to import an account one by one, not all accounts as above.

is there a way to fix it?

 

i shared several accountimportjson I used.

I could not see what I expected

"keyField": "name",
"listField": "users",
"statusConfig": {
"active": "true"
},
"colsToPropsMap": {
"name": "firstName~#~char",
"status": "verified~#~char",
"customproperty1": "firstName~#~char",
"customproperty4": "verified~#~char"
"keyField": "name",
"listField": "",
"statusConfig": {
"active": "true"
},
"colsToPropsMap": {
"name": "users[0].firstName~#~char",
"status": "users[0].verified~#~char",
"customproperty1": "users[0].firstName~#~char",
"customproperty4": "users[0].verified~#~char"
"keyField": "name",
"listField": "",
"statusConfig": {
"active": "true"
},
"colsToPropsMap": {
"name": "users.firstName~#~char",
"status": "users.verified~#~char",
"customproperty1": "users.firstName~#~char",
"customproperty4": "users.verified~#~char"

 

 

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Does firstname is unique?


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

MJ
New Contributor III
New Contributor III

Yes it is unique. There are few users in app due to test tenant. I think it is not unique issue.

 

All firstnames were combined an account name in saviynt now, 

And Other attributes like username and email are too long to combine an account name saviynt. It looks like there is a length limitation.

adriencosson
Regular Contributor III
Regular Contributor III

Have you tried to set the listField as "users[0]" and then map the attributes as you did in first place ?

Regards,
Adrien COSSON

MJ
New Contributor III
New Contributor III

yes i have tried, btw it did not work.

				"keyField": "name",
				"listField": "users[0]",
				"statusConfig": {
					"active": "true"
				},
				"colsToPropsMap": {
					"name": "firstName~#~char",
					"status": "verified~#~char",
					"customproperty1": "firstName~#~char",
					"customproperty4": "verified~#~char"
				}

MJ
New Contributor III
New Contributor III

is there any idea? please help me

keyField": "name",
"listField": "",
"statusConfig": {
"active": "true"
},
"colsToPropsMap": {
"name": "firstName~#~char",
"status": "verified~#~char",
"customproperty1": "firstName~#~char",
"customproperty4": "verified~#~char"


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

MJ
New Contributor III
New Contributor III

in this case, the response is null.

MJ_0-1675053099740.png