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 Mail attribute value for specific users

mgandr
New Contributor III
New Contributor III

Hello,

We have a scenario wherein we'd like to exclude updating of AD Mail attribute value to some users.

For instance, if the user's username is 'ABCDEF', we wish to retain the current value assigned to "mail", allowing updates to the other AD attribute values. On the other hand, if the user?.username is not equal to 'ABCDEF', the "mail" attribute value will be constructed by concatenating user?.customproperty31 and the domain.

Is it feasible to achieve this within the UpdateAccountJSON, or is the exclusion limited to the Advanced Query (SQL) section of the Provisioning Job, where we would prevent the Update Account task for the user?

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

You can update json with if else logic to retain

Sample Logic :

 

"Department":"${if((account.customproperty7 === null ? '' : account.customproperty7) === Department)(SAVIYNTNOTCHANGED) else (Department)}"


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

Amit_Malik
Valued Contributor II
Valued Contributor II

Hi @mgandr ,

This forum can help - https://forums.saviynt.com/t5/identity-governance/dont-provision-a-specific-attribute-if-dynamic-att...

As your use case is also update account. SAVIYNTNOTCHANGED will work.

Thanks, Amit

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

mgandr
New Contributor III
New Contributor III

I've tried the below but it doesn't seem to work and I'm getting this error No such property: customproperty24 for class: java.lang.String

"mail": "${if(account?.customproperty24.contains('ABC.com'))(SAVIYNTNOTCHANGED) else {user?.customproperty31 + Domain}}"

validate if name is exposed

"mail": "${if(account?.name.contains('ABC.com'))(SAVIYNTNOTCHANGED) else {user?.customproperty31 + Domain}}"

or 

"mail": "${account?.customproperty24?.contains('ABC.com') ? 'SAVIYNTNOTCHANGED' : (user?.customproperty31 ?: '') + 'Domain'}"


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

It didn't work too. 

"mail": "${account?.customproperty24?.contains('ABC.com') ? 'SAVIYNTNOTCHANGED' : (user?.customproperty31 ?: '') + 'Domain'}"

Error: No such property: customproperty24 for class: java.lang.String

"mail": "${if(account?.name == 'abc.def')(SAVIYNTNOTCHANGED) else {user?.customproperty31 + Domain}}" 

Error: No such property: name for class: java.lang.String

"mail": "${if(user?.username == 'ABC')(SAVIYNTNOTCHANGED) else {user?.customproperty31 + Domain}}"

Error: No such property: SAVIYNTNOTCHANGED for class: SimpleTemplateScript43999

SAVIYNTNOTCHANGED  not works with SAP Connector only


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