and more in a single search tool across platforms. Read the announcement here. |
03/11/2024 01:54 PM
Hi,
I need to use some user account attributes in the CreateTicketJSON.
In the documentation, I seen that AccountsObj are available but I don’t find the syntax to use.
I tried : ${account.customproperty1}, ${task?.accountKey?.customproperty1} but it doesn’t work. Any idea please ?
Thanks
03/11/2024 07:41 PM
Account yet not created hence object won't be available
03/11/2024 11:44 PM
Hi @rushikeshvartak ,
Let me explain the context. I use dynamics attributes when creating and modifying accounts, which I pass into the CreateTicketJSON.
But for the "enable account" / « Disable Account » Tasks, these dynamics attributes are empty because there is no access request, but the account already exists. So I want to set a condition to retrieve the attribute stored in the account's customproperty when the task type is "enable account » / « disable account ».
The only part that's blocking me is the retrieval of the account's attributes in the createTicket JSON, the account does exist (I'm disabling/enabling it).
Any Idea to retrieve these account attributes ?
I already tried ${account.customproperty1} / ${task?.accountKey?.customproperty1} but it doesn’t work.
Thanks
03/11/2024 11:50 PM
Hi @afauquem during the createTicket scenario, what is the account status in your system? Ideally the account status should be "Active" to access the account object. Please share the logs for the scenario.
03/11/2024 11:52 PM
you can try like belwo
\"P_M_EMAIL_ADDRESS\":\"${account?.customproperty9}\"
03/12/2024 12:43 AM
03/12/2024 12:56 AM
Hi @afauquem upon checking the logs, the account object is null in the binding objects.
"2024-03-12T07:19:19.576+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4-42css","DEBUG","combinedAccountRequestbinding: [ServiceAccountOwnerMap:[:], endpointsObj:XXX XXX, entitlementValuesObj:null, mockapi:testafa2, approvers:[Afauquembert], allEntitlementsValues:, usersManagerObj:Afauquembert, usermanager:Afauquembert, endpoint:XXX XXX, password:******, benefeciary:testafa2, requestedByDate:2024-03-12T07:19:19+00:00, REQUESTORIGIN:ECMV6, ACCOUNTKEY:500461, reqAttrs:[:], arstasksObj:com.saviynt.ecm.task.ArsTasks : 1473, accountsObj:[:], taskObjList:[com.saviynt.ecm.task.ArsTasks : 1473], usersObj:testafa2, userManager:Afauquembert, taskIds:[1473], requestor:Afauquembert, managerAccount:null, Saviynt For Saviynt:testafa2, userAttributesMap:[:], task:com.saviynt.ecm.task.ArsTasks : 1473, requestid:1774677, userAccount:[:], name:null :: testafa2@XXX.com.uat, ENDPOINT:27, Test - endpoint - mockApi:testafa, businessJustification:, requestAccessAttributes:[:], user:testafa2, account:null :: testafa2@XXX.com.uat]"
That is the reason, you are unable to use ${account?.customproperty9}.
In the meantime, can you try below?
\"givenName\":\"${com.saviynt.ecm.identitywarehouse.domain.Accounts.get(ACCOUNTKEY)?.customproperty9}\"
Let me know if this helps!
03/12/2024 01:14 AM
try
${requestAccessAttributes.get("customproperty1")}
or
${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint.customproperty1 +' ' + user.firstname +' ' + user.lastname} else {endpoint.customproperty6+' ' +user.firstname+' ' +user.lastname}}