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

ADSI: disableaccountjson- error while moving user from one OU to another and prepending cn value

saima
New Contributor II
New Contributor II

Hi, 

I want to prepend cn,name, dn with 'double underscore' and moveObjectToOU' ,

with dn,moveobjecttoOU value I'm able to update the attributes for example:

{
"objects": [
{
"objectClasses": ["user"],
"distinguishedName": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "OU=xxxx,OU=xxx,OU=xxxTest,DC=xxx,DC=xxxx,DC=xxxx",
"deleteAllGroups": "No",
"attributes": {
"userAccountControl": "514"
}
}
]
}

 

When I try with cn value it says dn doesn't exist. below json is the complete json for disableaccount

{
"objects": [
{
"objectClasses": ["user"],
"distinguishedName": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "OU=xxxx,OU=xx,OU=xxxTest,DC=xxx,DC=xxxx,DC=xxx",
"deleteAllGroups": "No",
"attributes": {
"userAccountControl": "514",
"cn": "${'__'+account.displayname}",
"name": "${'__'+account.displayname}",
"displayName": "${'__'+account.displayname}",
"info": "'Stamp' {Saviynt system: ${Calendar.getInstance().getTime().format('MM/dd/yyyy')} User Terminated}"
}
}
]
}

 

 

Below is the error in the logs: 

{ "status": "Failure", "failedObjects": [ { "id": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')}", "status": "Failure", "message": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')} does not exist.", "messageCodes": "OBJ_ERR_MSG_00002" } ],

have tried all the suggestions from forums, nothing seems to work, can someone pls suggest?

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

{
"objects": [
{
"objectClasses": ["user"],
"distinguishedName": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')}",
"moveObjectToOU": "OU=xxxx,OU=xx,OU=xxxTest,DC=xxx,DC=xxxx,DC=xxx",
"deleteAllGroups": "No",
"attributes": {
"userAccountControl": "514",
"cn": "${'__' + account.displayname}",
"name": "${'__' + account.displayname}",
"displayName": "${'__' + account.displayname}",
"info": "Stamp {Saviynt system: ${Calendar.getInstance().getTime().format('MM/dd/yyyy')} User Terminated}"
}
}
]
}


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

Hi rushikesh, 

I'm trying the same json, what I posted, it doesn't work. Any other suggestions pls?

did u tried other character


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

other character as in? can you please elaborate?

-- instead of __ try hypen


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

no Requirement is to prepend double underscore with cn, dn and displayname.

if we update cn, others should also update automatically, but renaming cn is not working in disable account json as well as updateacntjson

I understand requirement i am asking to validate if other special characters works


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