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

How can I extract groupName from groups array based on groupId during account Import?

alc
Regular Contributor
Regular Contributor

Hello,

We configured an endpoint Import to map customproperty2 to defaultGroupId with response below.

However, I want to show the groupName instead of groupId with customproperty2. Can you provide a script to extract the groupName from groups array based on the defaultGroupId value?

{
"username":"user01"
"defaultgroupId":"id02",
"groups": [
{
"groupName": "ThegroupName3",
"groupId": "id03"
},
{
"groupId": "id02",
"groupName": "ThegroupName2"
},
{
"groupId": "id01",
"groupName": "ThegroupName3"
}
]
}

Thanks

3 REPLIES 3

stalluri
Valued Contributor II
Valued Contributor II

@alc 
You can refer to this and map the data accordingly.
https://forums.saviynt.com/t5/community-knowledge-base/mapping-data-in-json-based-on-date-type-respo...
Or
We can use enhanced query and update the value.


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

rushikeshvartak
All-Star
All-Star

Please share current import json


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

alc
Regular Contributor
Regular Contributor

Hello Rushikes,

in our Import JSON, we only have following mappings. what we need to change for customproperty2 is not map to the defaultGroupId but map to the groupName from groups array  based on the defautlGroupId. the response entry is shown as my first post. we cannot find the correct scripting code to get the mapped groupName.

{
"name": "username~#~char",
"customproperty2": "defaultgroupId~#~char",
"accountID": "username~#~char"
}