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

Function com.saviynt.ecm.identitywarehouse.domain.Users.findAll not resolving in CreateUser Json

Anu
Regular Contributor
Regular Contributor

Hi,

Saviynt version EIC v24.3. 

Trying to use function com.saviynt.ecm.identitywarehouse.domain.Users.findAll{username==user.customproperty4} in create user json to pull email, the function seems to be un recognized. Here is the JSON snippet. Could you please assist if anything additional to be enabled.

"Email": \"${if(user.customproperty55.equals('ABC')){user?.getEmail()}else if(user.customproperty55.equals('XYZ')){com.saviynt.ecm.identitywarehouse.domain.Users.findAll{username==user.customproperty4}.get(0).email}}\",

Error:Error in creating user = Template contains string which are not allowed com.saviynt.

 

12 REPLIES 12

rushikeshvartak
All-Star
All-Star

com.saviynt class name are not allowed in JSONs 


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

Anu
Regular Contributor
Regular Contributor

Thanks for the response @rushikeshvartak . We have the same code working in version 5.5 in salesforce connector jsons. Is this class name restriction added in saviynt v24.3 connector?

Yes its blocked in EIC v24.x versions


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

Anu
Regular Contributor
Regular Contributor

Thanks for the response @rushikeshvartak  .So is there an alternate available to fulfil the above given else condition?

 

"Email": \"${if(user.customproperty55.equals('ABC')){user?.getEmail()}else if(user.customproperty55.equals('XYZ')){com.saviynt.ecm.identitywarehouse.domain.Users.findAll{username==user.customproperty4}.get(0).email}}\",

Anu
Regular Contributor
Regular Contributor

Thanks for the response @rushikeshvartak . In developer handbook for version v24.x i could see that  com.saviynt has been used . Could you please suggest if there is an alternate to achieve the above requirement

https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm

Anu_0-1716446629248.png

 

 

 

This is old documentation but using of class has been blocked in code. 
please let me know use case accordingly we can see alternative


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

Anu
Regular Contributor
Regular Contributor

Hi @rushikeshvartak ,

Each user has 2 Identities ,Standard account(Cp55=ABC) with email populated and Admin Account(Cp55=XYZ) with email null.

When an a user with XYZ account submits this application request his corresponding ABC accounts identities Email address needs to be fetched in create accountjson.Using CP4 value which contains username of other profile.

To simplify the usecase while provisioning userA we need user B's email address to fetched. we have userB username saved on userA profile .

This is the condition we were using for sp 5.5 version which is not working currently in V24.3

Email: ${if(user.customproperty55.equals('ABC')){user?.getEmail()}else if(user.customproperty55.equals('XYZ')){com.saviynt.ecm.identitywarehouse.domain.Users.findAll(username==user.customproperty4).get(0).email}}\"

You can create dynamic attributes and pass dynamic in json for another accounts name


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

Anu
Regular Contributor
Regular Contributor

@rushikeshvartak Can you please share some sample logic or reference to achieve the same. 

Use standard dynamic attributes sql to show other accounts account name on ars request form and then use ins create account json

${requestAccessAttributes.get('regions')}

da sample query

select name as id from accounts a ,user_accounts ua where ua.accountkey=a.accountkey and a.endpointkey=1000 and u.userkey=${requestee}


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

Raghu
Honored Contributor
Honored Contributor

@Anu  try below

${if(user.customproperty55.equals('ABC')){user?.getEmail()}else if(user.customproperty55.equals('XYZ')){com.saviynt.ecm.identitywarehouse.domain.Users.findAll(username==user.customproperty4).get(0).email}}\"


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Anu
Regular Contributor
Regular Contributor

@Raghu Thanks for the response. Tried the same but still same error.