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

Can i use Add access Json to create a new account in REST connector ?

Suresh1
New Contributor
New Contributor

Hello Team,

I have a use case where i need to pass entitlement_value selected in the ARS request in the REST call. I got to know from other forum discussions that we cannot access entitlement objects in create account json.

Hence, i'm trying to use add access json with multiple calls to achieve this. Is this possible or do we have any limitations in Add access json too ?

Please provide me a sample add access json with 2 calls, call 1 should be patch call and call 2 should be create account, Post call.

Regards,

Suresh V.  

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Sample

{
  "call": [
    {
      "name": "Group",
      "connection": "acctAuth",
      "url": "https://jira.xxx.com/rest/api/2/group/user?groupname=${entitlementValue.entitlement_value.replace(' ','+')}",
      "httpMethod": "POST",
      "httpParams": "",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          201
        ]
      }
    },
    {
      "name": "Group",
      "connection": "acctAuth",
      "url": "https://jira.xxx.com/rest/api/2/group/user?groupname=${entitlementValue.entitlement_value.replace(' ','+')}",
      "httpMethod": "POST",
      "httpParams": "",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "httpContentType": "application/json",
      "successResponses": {
        "statusCode": [
          201
        ]
      }
    }
  ]
}

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

Suresh1
New Contributor
New Contributor

So do we have any limitations on the call names here ? So, when i tried with Call1 name as groups and call2 name as Call2 it didnt work only call 1 was successful.

But now i tried with both call1 and call2 names as groups it did work. 

so do we have any limitations on the call names in Add access json ?

Regards,

Suresh V.

Call name should same as entitlement type name and that is limitation and how product works


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

Hi @rushikeshvartak ,

Can you provide me the syntax for passing a static value along with a dynamic cp value from users table in add access json https params ?

for instance, I'm using a if else statement as below.

\"spCustomAttribute2\":\"${if(entitlementValue?.entitlement_value=='SUPER_USER'){'SUPER_USER-OP_EE1:ADMIN'} else {'CALLCENTRE-OP_EE1:{user?.email}'}}\"

Here, i need to pass user's email dynamically. could you please provide the syntax to achieve this ?

Regards,

Suresh V.

\"spCustomAttribute2\": \"${if(entitlementValue?.entitlement_value == 'SUPER_USER') {'SUPER_USER-OP_EE1:ADMIN'} else {'CALLCENTRE-OP_EE1:' + user?.email}}\"


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