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

REST Application Entitlement Recon with Comma Separated response

ShantanuKumar
New Contributor III
New Contributor III
Hello,
 
We're currently working on importing entitlements as comma-separated values into entitlements using the REST Application with below response:
 
{
 "userlist": [
    {
     "groups": [
       "app-users",
       "admin"
      ],
     "name": "123456789"
    },
    {
     "groups": [
       "app-users"
      ],
     "name": "123456789"
    }
  ]
}
 
Could you please provide guidance on how to proceed with this? Are there any specific formatting requirements or limitations we should be aware of? Any insights or troubleshooting steps would be greatly appreciated.

Thanks,
Karan Chheda
15 REPLIES 15

NM
Honored Contributor II
Honored Contributor II

Hi @ShantanuKumar , 

Is this the response from get all user call?

ShantanuKumar
New Contributor III
New Contributor III

Yes.

NM
Honored Contributor II
Honored Contributor II

@ShantanuKumar , 

Use 

"CUSTOMPROPERTY31": "STORE#ACC#ENT#MAPPINGINFO~#~char" in accountparam

That will solve will your issue.

ShantanuKumar
New Contributor III
New Contributor III

I will ask my team to try it. I saw some articles that if the entitlement values are coming as comma separated then it won't work.

ShantanuKumar_0-1723476884360.png

 

 

rushikeshvartak
All-Star
All-Star

Use below code to resolve your issue

"customproperty31": "#CONST#${String output1=response.userlist.groups.replaceAll(', ','\",\"'); beg= ' {\"Group\":{\"entIds\":[\"'; end= '\"],\"keyField\":\"entitlementID\"}}' ; output2= beg.concat(output1) ; finoutput= output2.concat(end) ; return finoutput}~#~char".


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

ShantanuKumar
New Contributor III
New Contributor III

Hello Rushikesh,

I tried and getting CP31 of account as below screenshot.

image (5).png

ImportAccEntJSON:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"inactivateAccountsNotInFile": false,
"accountThresholdValue": 10000
},
"includeExistingInActiveAccounts":"true",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://####/getAllUsersWithGroups",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "userlist",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "name~#~char",
"name": "name~#~char",
"customproperty31": "#CONST#${String output1=response.userlist.groups.replaceAll(', ','\",\"'); beg= ' {\"Group\":{\"entIds\":[\"'; end= '\"],\"keyField\":\"entitlementID\"}}' ; output2= beg.concat(output1) ; finoutput= output2.concat(end) ; return finoutput}~#~char"
},
"makeProcessingStatus": false,
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.next_page==null?null:response.completeResponseMap.next_page}"
}
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}

Print response.userlist.groups in another custom property and see what data is coming 


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

ShantanuKumar
New Contributor III
New Contributor III

Below you can check the cp51 and cp31:
image (6).png

"customproperty31": "#CONST#${String output1=response.userlist.groups.replaceAll('[\\[\\]]', '').replaceAll(', ', '\",\"'); beg= '{\"Group\":{\"entIds\":[\"'; end= '\"],\"keyField\":\"entitlementID\"}}'; output2= beg.concat(output1); finoutput= output2.concat(end); return finoutput}~#~char"


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

ShantanuKumar
New Contributor III
New Contributor III

Still the same please check below screenshot:
image (7).png

In CP51 use replace ALL with const and remove [ /]


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

ShantanuKumar
New Contributor III
New Contributor III

Could you please give an example or provide the code as I am not able to modify it.

ShantanuKumar
New Contributor III
New Contributor III

Rishikesh, I am not able to understand the statement you made. Could you please explain or share the expression?

"customproperty51": "#CONST#${String output1=response.userlist.groups.replaceAll('[\\[\\]]', '').replaceAll(', ','\",\"'); return output1}~#~char"


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

ShantanuKumar
New Contributor III
New Contributor III

Hello Rushikesh,

Please check below screenshot still the groups are not selected as entitlement.image (8).png