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

Getting entitlement hierarchy from Array values

RizvanaShaik
New Contributor
New Contributor

Hi Team ,

we have a REST application where we are getting values as "values" : ["Accountname","alias","email","firstname","lastname","Statuskey",[{"id": "(entitlementt id)","entityid" : 9000] 

we are able to import entitlements in the entitlement mapping by using the UserGroup API , however we are not able to get the association between accounts & entitlements 

we are also able to get the info in cp31 as the accentmapping , but still the association is not being imported from logs we are facing error as Exception evaluating property 'id' for java.util.ArrayList, Reason: groovy.lang.MissingPropertyException: No such property: id for class: java.lang.String" 

 

 

14 REPLIES 14

NM
Honored Contributor II
Honored Contributor II

Hi @RizvanaShaik , can you share ss of cp31 value been stored and postman response and json you are using current.

rushikeshvartak
All-Star
All-Star
  • Please share below
    • Import JSON
    • Postman screenshot and curl command
    • Logs

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

Please find the below shared details

  • Import JSON
  • Postman screenshot and curl command
  • Logs
  • Import JSON:

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<URL here>",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "rows",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "object.id~#~char",
"name": "values[0]~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.next_page==null?null:response.completeResponseMap.next_page}"
}
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Group": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<URL here>",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "rows",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "object.id~#~char",
"entitlement_value": "values[0]~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.next_page==null?null:response.completeResponseMap.next_page}"
}
},
"disableDeletedEntitlements": true
}
}
}
}
},
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"Group": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpAcctToEnt",
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "<URL here>",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"acctKeyField": "accountID",
"entKeyField": "entitlementID",
"entIdPath": "rows[*].values[9][*].id",
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.next_page==null?null:response.completeResponseMap.next_page}"
}
}
}
}
}
}
}
}

  •  Postman screenshot and curl command
    RizvanaShaik_4-1724417548612.png
  • Logs

RizvanaShaik_3-1724417350024.png

 

"entIdPath": "values.id",


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

HI @rushikeshvartak, the recommendation you specified didn't work. below is the CURL command we have in our postman

curl --location 'https://<URL> here' \
--header 'Authorization: Basic xyzabc' \
--header 'Cookie: xyzabc' \
--data ''

Provides api response in text format


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

 

Please find the below sample api response in text format

{
"rows": [
{
"object": {
"id": "0", - AccountID
"entityId":
},
"values": [
"Test", - AccountName
"",
"",
"",
"",
"",
"1",
"",
"",
[
{
"id": "1", - Entitlement ID
"entityId":
}
]
]
}
]
}

"entIdPath": "rows.values[9].id",


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

Hi @rushikeshvartak, the recommendation you specified the above didn't work. 

rows[*].values[9].id


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

@rushikeshvartak Tried with the above recommendation, still it is not working.

 

stalluri
Valued Contributor II
Valued Contributor II

@RizvanaShaik 

Can you try this .
"entitlementID": "values[9][0].id~#~char"


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

@stalluri  tried with the above recommendation as passing the "entitlementID": "values[9][0].id~#~char" in the acctEntMappings, still it is not working. 

stalluri
Valued Contributor II
Valued Contributor II

@RizvanaShaik 
Can you try these 
{ "listField": "rows[*].values[9]", "keyField": "accountID", "colsToPropsMap": { "entitlementID": "id~#~char" } }
or
{
"listField": "rows",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "object.id~#~char",
"name": "values[0]~#~char",
"entitlementID": "values[*].id~#~char"
}
}


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