and more in a single search tool across platforms. Read the announcement here. |
04/21/2023 01:48 AM
HI Team,
While provisioning account in AD via ADSI connection, we are receiving the following error:
Provisioning Comments:
Error while creating account in ADSI : { "status": "Failure", "failedObjects": [ { "id": " OU = xxx", "status": "Failure", "message": "Failed to create object of given objectClasses", "messageCodes": "OBJ_ERR_00001", "errorDetails": "OBJ_ERR_00001 : -2147024865 : A device attached to the system is not functioning. : 00000523: SysErr: DSID-031A1260, problem 22 (Invalid argument), data 0\n" } ], "connectionString": "LDAP://xxxx" }
Could you please share any insights regarding the same.
04/24/2023 03:20 AM
Hi @sdey_2023
As per the above logs it looks like the issue might be of object class or invalid argument ( data being sent ) or if connection is not active, can you confirm the below points
1. Connection is working fine ( Check with the postman as well )
2. Check the object class if you are sending it correctly
3. See there are any json issue ( data ), if possible attach the create account json and check also ADSI agent logs.
Thanks
Darshan
04/24/2023 06:00 AM
Hi Darshan
Looks like its JSON issue, am trying to add proxyaddresses but looks like connector is unable to compute proxyaddress value and because of that its not computing other logics and hence the payload is not in right format.
Currently am not using any transformation logic for proxyaddress and its still connector is not creating the right payload. Here is my json:
{
"objects":[
{
"objectClasses":[
"user",
"top",
"Person",
"OrganizationalPerson"
],
"attributes":{
"sn":"${user.lastname}",
"sAMAccountName":"${user.customproperty2}",
"cn":"${cn}",
"userAccountControl":512,
"extensionAttribute12":"${org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(12).toUpperCase() }",
"displayName":"${user.displayname}",
"mailNickName":"${user.email.substring(0,user.email.indexOf('@'))}",
"proxyAddresses":"SIP:sangita.ladi@XXX.domain.Local",
"givenName":"${user.firstname}"
},
"baseDn":" OU=Employees,OU=ActiveUsers,OU=Users,OU=UsersandWorkstations,DC=XXX,DC=XXX,DC=XXX",
"password":"${password}"
}
]
}
Any insights why this JSON does not work. WIthout Proxyaddresses, it works fine.
Is there any syntax issue in Proxyaddress logic.
Regards
Sangita Ladi
04/24/2023 06:18 AM
Hi @sangitaladi
Can you pass proxy address in a array format like below ( multi valued field )
"proxyAddresses":["SIP:sangita.ladi@XXX.domain.Local"],
04/24/2023 05:50 AM
Hi,
The error message suggests that the error is related to an invalid argument, which means that one or more of the parameters being passed to the AD account creation process are incorrect or missing.
Can you paste the CreateAccountJSON?
Thanks
04/24/2023 06:28 AM
The error suggests that one of the attribute is having period(.) in the end. Please check if any such attribute . CN,BaseOU ,DN should be checked.
04/24/2023 01:05 PM
THank you all for the valuable comments, now i can compute the proxyAddress logic but still its failing to evalauate, i have 3 conditions and am using below. But its not working:
"proxyAddresses":["${if(user?.email.contains('Consultant')){'SMTP:' + user.email} else if(user.customproperty45==null || user.customproperty45 !='O'){'smtp:' + user.email.substring(0,user.email.indexOf('@')) + 'xlgroupcrm.mail.onmicrosoft.com','SMTP:' + user.email.substring(0,user.email.indexOf('@')) + '@domain.com','sip:' + user.email.substring(0,user.email.indexOf('@'))+@domain.com'} else if(user.customproperty45 =='O'){'smtp:'+user.email.substring(0,user.email.indexOf('@')) + 'groupcrm.mail.onmicrosoft.com','SMTP:' + user.email.substring(0,user.email.indexOf('@')) + '@contractor.domain.com','sip:' + user.email.substring(0,user.email.indexOf('@')) + '@contractor.domain.com'}}"]
Any suggestions, where am i commiting mistakes.
Regards
Sangita Ladi
04/24/2023 01:35 PM
Can you try adding else condition at the end and try again?
Also can you try below and see if it helps?
if(user?.email.toString().contains('Consultant')
Thanks
04/25/2023 04:13 AM
Tried but no luck. it did not work.
04/25/2023 03:03 AM
It looks like there may be some syntax errors in the expression you provided. Here's a modified version of your expression with some potential syntax errors corrected:
"proxyAddresses": [
"${if(user?.email.contains('Consultant')){'SMTP:' + user.email}
else if(user.customproperty45==null || user.customproperty45 !='O'){
'smtp:' + user.email.substring(0,user.email.indexOf('@')) + 'xlgroupcrm.mail.onmicrosoft.com',
'SMTP:' + user.email.substring(0,user.email.indexOf('@')) + '@domain.com',
'sip:' + user.email.substring(0,user.email.indexOf('@')) + '@domain.com'
}
else if(user.customproperty45 =='O'){
'smtp:'+user.email.substring(0,user.email.indexOf('@')) + 'groupcrm.mail.onmicrosoft.com',
'SMTP:' + user.email.substring(0,user.email.indexOf('@')) + '@contractor.domain.com',
'sip:' + user.email.substring(0,user.email.indexOf('@')) + '@contractor.domain.com'
}
}"
]
04/25/2023 04:12 AM
No luck. it did not work.
04/25/2023 06:13 AM
Any errors using the above? if yes share it
04/25/2023 08:52 AM - edited 04/25/2023 08:57 AM
the above logic is giving invalid json. and its no different than i have. my logic is valid but its not giving right transformation and hence connector is not creating the right payload and gives a generic 400 failure with message :
"status": "Failure",
"message": "Failed to create object of given objectClasses",
"messageCodes": "OBJ_ERR_00001",
"errorDetails": "OBJ_ERR_00001 : -2147463168 : Unknown error (0x80005000)"
}
06/08/2023 08:52 AM