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

Task Source in UpdateAccountJSON

jezzanuena
Regular Contributor II
Regular Contributor II

Hi, We have a requirement a certain attribute if the task is created by a certain analytic report. Is there a way to do this? Like putting the analytic id or something?

Appreciated your response.

10 REPLIES 10

rushikeshvartak
All-Star
All-Star

Yes you can add condition

Refer https://forums.saviynt.com/t5/identity-governance/quot-username-quot-quot-if-task-requestkey-null-us...

Sample 

"{\"securitysystem\":\"${if(arsTasks.source.equals('ANALYTICS_V2')){'Sav4Sav_Dev'}else{''}}\",

 

Different sources values 

SOURCE

ZERODAY
WEBSERVICE
SOD
ROLES
REQUEST
PROVRULE
ONECLICKDISABLE
FFROLE
CERTIFICATION
BASELINE_TASK
ANALYTICS_V2

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

NM
Honored Contributor II
Honored Contributor II

@jezzanuena you can apply to 2 filter task create from analyticsv2 and on id.

jezzanuena
Regular Contributor II
Regular Contributor II

Thank you @rushikeshvartak  for checking on this,, we can use Analytics_V2, but we would like to select which specific analytcs_v2 to put in the condition. 

You can use source id for specific report

rushikeshvartak_0-1726595781259.png

select source ,sourceid from arstasks where source ='Analytics_V2'

"{\"securitysystem\":\"${if(arsTasks.source.equals('ANALYTICS_V2') && arsTasks.sourceId.equals('1471')){'Sav4Sav_Dev'}else{''}}\",

 


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

Thank you, @rushikeshvartak  does it work in UpdateAccountJSON in AD? I am currently using this one:

"acct-suAccountsOwned":
"${if (task.source=='ANALYTICS_V2'){'CN='+('s'+user.username.substring(1,7))+',OU=folder,DC=na,DC=corp,DC=folder,DC=com'} else {null}}"

It should works since version is 24.5 https://docs.saviyntcloud.com/bundle/EIC-Connectors/page/Content/Binding-Variables-for-Provisioning-...


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

Unfortunately no, I received this error: Error while Update operation for account-eq5vlww in AD - [LDAP: error code 21 - 00000057: LdapErr: DSID-0C0910C0, comment: Error in attribute conversion operation, data 0, v3839]

"acc-suAccountsOwned":
"${if (arsTasks.source.equals('ANALYTICS_V2') && arsTasks.sourceId.equals('614')) {'CN='+('s'+user.username.substring(1,7))+',OU=folder,DC=qana,DC=qacorp,DC=folder,DC=com'} else {null}}"

Use arstasksObj


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

jezzanuena
Regular Contributor II
Regular Contributor II

Thank you, @rushikeshvartak unfortunately it didn't work. It is not throwing an error and it not updating the account either. So I have 2 update cases here:

1. When task is created from the specific analytic report it will update the account with the blue highlighted attributes below only.

2. If the task is created from another analytic, it will update the account except the blue highlighted

{
"givenName": "${user.preferedFirstName==null?user.firstname:user.preferedFirstName}",
"manager": "${(managerAccount==null || managerAccount.accountID == null)?'':((user.leaveStatus != null && user.leaveStatus=='1') ? '':managerAccount.accountID)}",
"sn": "${user.lastname}",
"displayName": "${user.displayname}",
"l": "${(user.city != null && !user.city.isEmpty())? user.city:'N/A'}",
"co": "${user.country}",
"msExchUsageLocation": "${user.region}",
"departmentNumber": "${user.departmentNumber}",
"employeeNumber": "${user.employeeid}",
"employeeType": "${if(user.employeeType.equalsIgnoreCase('E') || user.employeeType.equalsIgnoreCase('EMP')){'E'} else if(user.employeeType.equalsIgnoreCase('C') || user.employeeType.equalsIgnoreCase('CWR')){'C'} else {null}}",
"physicalDeliveryOfficeName": "${(user.locationdesc != null && !user.locationdesc.isEmpty())? user.locationdesc:'N/A'}",
"department": "${(user.leaveStatus != null && user.leaveStatus=='1') ? '':user.departmentname}",
"postalCode": "${(user.regioncode != null && !user.regioncode.isEmpty())? user.regioncode:'N/A'}",
"st": "${(user.state != null && !user.state.isEmpty())? user.state:'N/A'}",
"title": "${(user.title != null && !user.title.isEmpty()) ? ((user.leaveStatus != null && user.leaveStatus=='1') ? 'N/A':user.title):'N/A'}",
"company": "${(user.companyname != null && !user.companyname.isEmpty())? user.companyname:'N/A'}",
"initials": "${user.middlename}",
"telephoneNumber": "${(user.phonenumber != null && !user.phonenumber.isEmpty())? user.phonenumber:'N/A'}",
"mobile": "${(user.secondaryPhone != null && !user.secondaryPhone.isEmpty())? user.secondaryPhone:'N/A'}",
"grade": "${(user.customproperty3 != null && !user.customproperty3.isEmpty()) ? ((user.leaveStatus != null && user.leaveStatus=='1') ? 'N/A':user.customproperty3):'N/A'}",
"streetAddress": "${(user.street != null && !user.street.isEmpty())? user.street:'N/A'}",
"acct-segcode1": "${(user.employeeType.equalsIgnoreCase('E') || user.employeeType.equalsIgnoreCase('EMP')) ? user.customproperty7 : ''}",
"acct-segcode2": "${(user.employeeType.equalsIgnoreCase('E') || user.employeeType.equalsIgnoreCase('EMP')) ? user.customproperty9 : ''}",
"acct-segment1": "${(user.employeeType.equalsIgnoreCase('E') || user.employeeType.equalsIgnoreCase('EMP')) ? user.customproperty8 : ''}",
"acct-segment2": "${(user.employeeType.equalsIgnoreCase('E') || user.employeeType.equalsIgnoreCase('EMP')) ? user.customproperty10 : ''}",
"acct-segment3": "${user.customproperty35}",
"acct-companyCode": "${(user.orgunitid != null && !user.orgunitid.isEmpty())? user.orgunitid:'N/A'}",
"acct-JobLevel": "${(user.leaveStatus != null && user.leaveStatus=='1') ? '':user.job_function}",
"acct-RemoteUser": "${(user.customproperty4 != null && (user.customproperty4.equalsIgnoreCase('Y') || user.customproperty4=='1'|| user.customproperty4.equalsIgnoreCase('YES')))?'TRUE':'FALSE'}",
"acct-HRProfessional": "${(user.customproperty1 != null && (user.customproperty1.equalsIgnoreCase('Y') || user.customproperty1=='1'|| user.customproperty1.equalsIgnoreCase('YES')))?'TRUE':'FALSE'}",
"acct-strExempt": "${user.customproperty2}",
"acct-RawTelephoneNumber": "${user.phonenumber}",
"acct-Managerentrydate": "${user.customproperty15}",
"acctJobFamilyGroup": "${user.customproperty16}",
"acctJobFamily": "${user.customproperty17}",
"acctHeadOfOrg": "${user.customproperty18}",
"acctEssential": "${user.customproperty19}",
"acct-vendor": "${user.customproperty21}",
"isManager": "${(user.customproperty6 != null && (user.customproperty6.equalsIgnoreCase('Y') || user.customproperty6=='1'|| user.customproperty6.equalsIgnoreCase('YES')))?((user.leaveStatus != null && user.leaveStatus=='1') ? 'FALSE':'TRUE'):'FALSE'}",
"msExchHideFromAddressLists": "${((user.statuskey!=1) || (user.leaveStatus != null && user.leaveStatus=='1'))?'TRUE':'FALSE'}",
"costCenter": "${(user.costcenter != null && !user.costcenter.isEmpty())? user.costcenter:'N/A'}",
"officeCode": "${user.locationnumber}",
"empStatus": "${(user.statuskey == 0 && (user.customproperty5.equalsIgnoreCase('A')|| user.customproperty5.equalsIgnoreCase('L') || user.customproperty5.equalsIgnoreCase('P') || user.customproperty5.equalsIgnoreCase('S') || user.customproperty5.equalsIgnoreCase('F') )) ? 'Orphaned' : user.customproperty5}",
"terminationDate": "${(user.enddate != null && user.enddate != '' ? ((Date)user.enddate).format('yyyy-MM-dd'):'N/A')}",
"ManagerDisplayName": "${managerAccount==null?'':((user.leaveStatus != null && user.leaveStatus=='1') ? '':managerAccount.customproperty5)}",
"ManagerEmail": "${(manager !=null && manager.email != null && !manager.email.isEmpty()) ? ((user.leaveStatus != null && user.leaveStatus=='1') ? 'N/A':manager.email):'N/A'}",
"hireDate": "${(user.comments != null && !user.comments.isEmpty() && Date.parse('yyyy-MM-dd',user.comments).format('yyyy-MM-dd')==((Date)user.startdate).format('yyyy-MM-dd')?((Date)user.startdate).format('yyyy-MM-dd'):(user.comments == null || user.comments.isEmpty() ? 'N/A': Date.parse('yyyy-MM-dd',user.comments).format('yyyy-MM-dd')))}",
"rehireDate": "${(user.comments != null && !user.comments.isEmpty() && Date.parse('yyyy-MM-dd',user.comments).format('yyyy-MM-dd')!=((Date)user.startdate).format('yyyy-MM-dd')?((Date)user.startdate).format('yyyy-MM-dd'):'N/A')}",
"acct-suAccountsOwned":
"${if (arstasksObj.source.equals('ANALYTICS_V2') && arstasksObj.sourceId.equals('614')) {'CN='+('s'+user.username.substring(1,7))+',OU=SuperUsers,DC=qana,DC=qacorp,DC=acct,DC=com'} else {null}}"
}

{
"acct-suAccountsOwned": "${arstasksObj.source.equals('ANALYTICS_V2') && arstasksObj.sourceId.equals('614') ? 'CN=' + ('s' + user.username.substring(1, 7)) + ',OU=SuperUsers,DC=qana,DC=qacorp,DC=acct,DC=com' : null}"
}


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