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

ADSI DisableAccountJSOn not going through on Account binding attribute

PratithShetty
New Contributor III
New Contributor III

Hi All

Facing issues when i am passing accounts.customproperty values in the moveObjectToOU. The whole json is passed as a string while provisioning and the task fails. But when i replace the if else statement with a static value the JSON works well. 

WHAT WORKS 
{
"objects":[{"objectClasses":["user"],
"distinguishedName": "${accounts.accountID.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "OU=Disabled Users,DC=plhgroupinc,DC=net",
"attributes":{"userAccountControl":514}
}]}

Here is what i have tried for my usecase to pass validate a account customproperty

{
"objects":[{"objectClasses":["user"],
"distinguishedName": "${account.accountID.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "${if(account.customproperty2 == ('PLH Group, Inc')){'OU=Disabled Users,DC=plhgroupinc,DC=net'} else {'OU=Disabled Users,DC=plhgroupinc,DC=net'}}",
"attributes":{"userAccountControl":514}
}]}

 

 

{
"objects":[{"objectClasses":["user"],
"distinguishedName": "${account.accountID.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "${if(accountsObj?.customproperty2 == ('PLH Group, Inc')){'OU=Disabled Users,DC=plhgroupinc,DC=net'} else {'OU=Disabled Users,DC=plhgroupinc,DC=net'}}",
"attributes":{"userAccountControl":514}
}]}

 

{
"objects":[{"objectClasses":["user"],
"distinguishedName": "${account.accountID.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "${if(account.customproperty2.equals('PLH Group, Inc')){'OU=Disabled Users,DC=plhgroupinc,DC=net'} else {'OU=Disabled Users,DC=plhgroupinc,DC=net'}}",
"attributes":{"userAccountControl":514}
}]}

I know the issue lies in the IF-ELSE statement only. Has anyone seen this issue? Is there is limit with the customproperty number that is exposed for the account binding variable? 


1 REPLY 1

rushikeshvartak
All-Star
All-Star

{
"objects": [{
"objectClasses": ["user"],
"distinguishedName": "${accounts.accountID.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "${accounts.customproperty2 == 'PLH Group, Inc' ? 'OU=Disabled Users,DC=plhgroupinc,DC=net' : 'OU=Disabled Users,DC=plhgroupinc,DC=net'}",
"attributes": {
"userAccountControl": 514
}
}]
}


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