We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Need to know how to pass the authenticationType in httpParams

SriRanga
Regular Contributor
Regular Contributor

Hi Team,

Can someone please help to pass the correct format to call authentication type in body, So it was Rest based SSO enabled application with Basic Authorization.

We need to pass authentication Type  in body for every post API call.

So please let me know the approach of passing the authentication type.

To pass-
"authenticationType": {
    "id"1
  }
 
Current JSON-
{
"call":[
{
"name":"call1",
"connection":"acctAuth",
"url":"url/${account.accountID}",
"httpMethod":"PUT",
"httpParams":"{ \"firstName\": \"${user.firstname}\", \"lastName\": \"${user.lastname}\", \"email\": \"${user.email}\", \"phone\": \"${user.phonenumber}\", \"title\": \"${user.title}\", \"location\": \"${user.location}\",\"authenticationType\":\"id: 1\"}, \"licenseType\":\"${requestAccessAttributes.get('LicenseType')==null?'RESERVED_COLLABORATOR':requestAccessAttributes.get('LicenseType')}\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"successResponses":{
"statusCode":[
200,
201
]
}
}
]
}
 
Regards,
Sri Ranga
2 REPLIES 2

rushikeshvartak
All-Star
All-Star
{
"call":[
{
"name":"call1",
"connection":"acctAuth",
"url":"url/${account.accountID}",
"httpMethod":"PUT",
"httpParams":"{ \"firstName\": \"${user.firstname}\", \"lastName\": \"${user.lastname}\", \"email\": \"${user.email}\", \"phone\": \"${user.phonenumber}\", \"title\": \"${user.title}\", \"location\": \"${user.location}\",\"authenticationType\":{\"id: 1\"}}, \"licenseType\":\"${requestAccessAttributes.get('LicenseType')==null?'RESERVED_COLLABORATOR':requestAccessAttributes.get('LicenseType')}\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"successResponses":{
"statusCode":[
200,
201
]
}
}
]
}
 

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

@rushikeshvartak I had tried by passing the authentication type for creating a new account still the tasks are getting error out with some syntax error but from validator there were no JSON errors can you please helpon this.

Json-

{
"accountIdPath":"call1.message.meta.id",
"call":[
{
"name":"call1",
"connection":"acctAuth",
"url":"https://url/rest/v1/users",
"httpMethod":"POST",
"httpParams":"{ \"firstName\": \"${user.firstname}\", \"lastName\": \"${user.lastname}\", \"email\": \"${user.email}\", \"phone\": \"${user.phonenumber}\", \"title\": \"${user.title}\", \"location\": \"${user.location}\",\"authenticationType\":{\"id: 1\"},\"licenseType\":\"RESERVED_COLLABORATOR\"}",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"httpContentType":"application/json",
"successResponses":{
"statusCode":[
200,
201
]
}
}
]
}

 

error-

{"message":"Unexpected character ('}' (code 125)): was expecting a colon to separate field name and value\n at [Source: { \"firstName\": \"Anil\", \"lastName\": \"Fernandes\", \"email\": \"null\", \"phone\": \"null\", \"title\": \"Aon-Contractor\", \"location\": \"INMH003\",\"licenseType\":\"RESERVED_COLLABORATOR\",\"authenticationType\":{\"id: 1\"}}; line: 1, column: 228]","status":"Failed"}]}

 

Regars,

Sri Ranga