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: 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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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
Honored Contributor II
Honored Contributor II

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
Honored Contributor II
Honored Contributor II

@saima Try adding base dn once in account name rule