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: Assign manager OU to subordinate

saima
New Contributor II
New Contributor II

Hi Experts,

I want to assign the manager OU to users reporting to him.

Suppose Manager's OU= CN=HN50\, User,OU=Services,OU=Sales,OU=SaviyntTest,DC=HCHC,DC=UPC,DC=ABC,

His subordinate should be created under OU=Services,OU=Sales,OU=SaviyntTest,DC=HCHC,DC=UPC,DC=ABC,

"baseDn": "{managerAccount?.accountID.replace('cn=*','')}", ->this doesnt work can anyone please let me know, how to achieve this?

Error while creating account in ADSI : { "status": "Failure", "failedObjects": [ { "id": "{managerAccount?.accountID.replace('cn=*','')}", "status": "Failure", "message": "Failed to create object of given objectClasses"

 

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

{
"baseDn": "${managerAccount?.accountID.replace(/^CN=[^,]+,/, '')}"
}


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

saima
New Contributor II
New Contributor II

hi, 

tried the above getting error- 

2024-05-21T13:33:33+05:30-ecm-worker-adsi.SaviyntGroovyADSIService-quartzScheduler_Worker-7-bt5sl-DEBUG-Exception in inizializeProvisioningConnectioncom.fasterxml.jackson.core.JsonParseException: Unrecognized character escape ',' (code 44)| at [Source: {| "objects": [| {| "objectClasses": [| "user",| "top",| "Person",| "OrganizationalPerson"| ],|

 

 

2024-05-21T13:33:33+05:30-ecm-worker--null-bt5sl--java.lang.NullPointerException: Cannot get property 'url' on null object at com.saviynt.provisoning.adsi.SaviyntGroovyADSIService.processWebService(SaviyntGroovyADSIService.groovy:1507) at com.saviynt.provisoning.adsi.SaviyntGroovyADSIService$_createAccountADSI_closure8.doCall(SaviyntGroovyADSIService.groovy:526) at com.saviynt.provisoning.adsi.SaviyntGroovyADSIService.createAccountADSI(SaviyntGroovyADSIService.groovy:374)

NM
Valued Contributor
Valued Contributor

Hi @saima , are you adding the same in account name rule?

saima
New Contributor II
New Contributor II

nope not in accountnamerule, only createaccountjson.

NM
Valued Contributor
Valued Contributor

@saima Try adding base dn once in account name rule