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

Retain AD account attribute for a specific Account type

Shreya47
New Contributor III
New Contributor III

Hi Team,

Background:

We have a scenario where a single user is having 2 Active AD accounts. One Primary for which AccountType will be blank and the other is Admin account for which AccountType is “P”.

Requirement

When an update account is triggered for these users, it should not update the display name for the Admin account. The display name should only change for the Primary account.

 

Original UPDATEACCOUNTJSON:

{

"givenName": "${user.firstname}",

"sn": "${user.lastname}",

"displayname": "${displayname}",

"employeetype": "${user.customproperty8}",

}

We tried the below changes in the UpdateAccountjson to retain the displayname for the Admin account, however it is not working.

"displayname": "${if(task.accountKey.accounttype == null){user.displayname} else {}}"

 

Issue: This completely removed the existing Displayname from the Admin AD account.

 

"displayname": "${if(task.accountKey.accounttype == “P”){ SAVIYNTNOTCHANGED} else{user.displayname}}"

 

Issue: It threw an error “No such property: SAVIYNTNOTCHANGED for class: SimpleTemplateScript382652”

 

"displayname": "${if(task.accountKey.accounttype == 'P'){task.accountKey.displayname} else{user.displayname}}"

 

Issue: It threw an error “No such property: displayname for class: com.saviynt.ecm.identitywarehouse.domain.Accounts Possible solutions: displayName”

 

 

Could you please suggest how we can achieve this.

Reference Forum Posts:

Retain AD Account Mail attribute value for specifi... - Saviynt Forums - 78002

 

4 REPLIES 4

NM
Honored Contributor II
Honored Contributor II

Hi @Shreya47, try using account.accounttype instead of using task table..

naveenss
All-Star
All-Star

Hi @Shreya47  can you try below?

"displayname": "${if(task.accountKey.accounttype == 'P'){task.accountKey.displayName} else{user.displayname}}"

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Shreya47
New Contributor III
New Contributor III

Thanks @naveenss , It worked!

rushikeshvartak
All-Star
All-Star

SAVIYNTNOTCHANGED is not supported for AD Connector. Only works for SAP connector 

Upvote - https://ideas.saviynt.com/ideas/EIC-I-5729


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