Click HERE to see how Saviynt Intelligence is transforming the industry. |
02/27/2024 03:48 AM - last edited on 02/27/2024 04:28 AM by Sunil
Hi Team,
While creating ticket for some disconnected Application, using below JSON:
"httpParams": "{\"opened_by\":\"${requestor}\",\"requested_for\":\"$user.username\",\"assignment_group\":\"Application Support\",\"short_description\":\"This request has been created from Saviynt Security Manager IAM system\",\"RequestID\":\"${if(task.requestKey!=null){task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}else if(task.requestKey==null){task.id}}\",\"description\":\"${if(task.tasktype==1 || task.tasktype==3){'Complete this request to create account for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application along with access '+allEntitlementsValues}else if(task.tasktype==2 && (allEntitlementsValues==null || allEntitlementsValues.isEmpty() || allEntitlementsValues=='')){'Complete this request to remove account for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application as all accesses removed'}else if(task.tasktype==2 && task.source=='REQUEST'){'Complete this request to remove access for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application with access '+allEntitlementsValues}else if (task.source=='CERTIFICATION' && task.tasktype==2){'This request is to remove access as part User Manager Certification for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application with access '+allEntitlementsValues}else {'Complete this request to remove account for ' +user.firstname+' ' +user.lastname +' in ' +task.endpoint?.displayName +' application along with access '+allEntitlementsValues}}\",\"application\":\"${task.endpoint?.displayName}\"}"
It is not populating the requested_for and opened_by attributes:
Over postman it is showing like this for opened_by and requested_for with a link:
How can we resolve the issue?
Regards
[This message has been edited by moderator to mask URL]
Solved! Go to Solution.
02/27/2024 04:55 AM
Hello @AtrayeeDutta ,
The "Requested for" and "Opened by" attribute in ServiceNow are a reference object to a user in "sys_user" table.
Therefore you need to pass the sys_id of the same user you want to create the request for.
Hope this helps.
02/27/2024 07:02 AM
Hi Team,
How can we pass that from Saviynt from create ticket json? requestor and requested user username are present in the arstasks only right.
Regards
Regards
02/27/2024 08:17 PM
try below
"httpParams": "{\"requested_for\":\"${user?.email}\",\"short_description\":\"Saviynt Request ${if(task.requestKey!=null){task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}else if(task.requestKey==null){task.id}} – ${if(task.tasktype==1){'Add Entitlement'} else if(task.tasktype== 2){'Remove Entitlement'}} – Requested for $user.displayname ($user.username)\",\"description\":\"Saviynt Request ${if(task.requestKey!=null){task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}else if(task.requestKey==null){task.id}} – ${if(task.tasktype==1){'Add Entitlement'} else if(task.tasktype== 2){'Remove Entitlement'}} – Requested for $user.displayname ($user.username) for $task.endpoint.displayName \",\"task_details\":[{\"short_description\":\"Saviynt Request ${if(task.requestKey!=null){task.requestKey?.processinstanceid?.substring(task.requestKey?.processinstanceid?.indexOf('.') + 1, task.requestKey?.processinstanceid?.length())}else if(task.requestKey==null){task.id}} – ${if(task.tasktype==1){'Add Entitlement'} else if(task.tasktype== 2){'Remove Entitlement'}} – for $user.displayname ($user.username - $user.locationdesc) for $task.endpoint.displayName\",\"description\":\"${allEntitlementsValues}\", \"assignment_group\":\"Help Desk\"}]}",
Make sure email match with service now and saviynt
02/27/2024 08:22 PM
@AtrayeeDutta we are using this and it works :
,\"requested_for\":\"${user.email}\",\"opened_by\":\"${if(task.requestKey!=null){com.saviynt.ecm.identitywarehouse.domain.Users.get(task?.requestedBy).email}else{''}}\"
Also as mentioned make sure the email is same across SNOw and Saviynt
03/04/2024 03:35 AM
Thank you Team, it worked.