PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners Click HERE | EMEA/APJ Click HERE

ADSI - Create account json

bchrist
New Contributor
New Contributor
when i try to create an ADSI account through the provisioning task i got the following error : Error while creating account in ADSI : Cannot get property 'url' on null object 
in the connector this is my CREATEACCOUNTJSON parameter :
{
  "objects": [
    {
      "objectClasses": [
        "user",
        "top",
        "Person",
        "OrganizationalPerson"
      ],
      "attributes": {
        "sn": "${user.lastname}",
        //"sAMAccountName": "${task.accountName}",
        //"sAMAccountName": "${user.systemUserName}",
        "cn": "${cn.replace(',', '\\,')}",
        "userAccountControl": 512,
        "c": "${user.country}",
        "company": "BU=${user.customer.customername}",
        "department": "${user.customer.description} [${user.customer.customername}]",
        "displayName": "${user.displayname}",
        "employeeID": "${user.employeeid}",
        "employeeType": "${user.employeeType}",
        "givenName": "${user.firstname}",
        "l": "${user.location}",
        "extensionAttribute11": "${user.mail != null && user.mail != '' ? 'sync' : ''}",
        "extensionAttribute1": "${user.customer.customproperty12}",
        "extensionAttribute2": "${user.customer.customproperty14}",
        "extensionAttribute3": "${user.customer.customproperty16}",
        "extensionAttribute6": "${user.customer.customproperty25}",
        "extensionAttribute5": "${user.customer.customproperty26}",
        "preferredLanguage": "${user.customproperty34 != null ? user.customproperty34 : null}",
        "telephoneNumber": "${user.phonenumber}",
        "mobile": "${user.secondaryPhone}",
        "title": "${user.title}",
        "manager": "${managerAccount.accountID}",
        "mail": "${user.email}",
        "userPrincipalName": "${(user.email != null && user.email != '') ? user.email : user.firstname.toLowerCase()+'.'+user.lastname.toLowerCase()+'@bureauveritas.com'}",
        "mailNickname": "${(user.email != null && user.email != '') ? user.email.replaceAll('@..*','') : ''}",
        "extensionAttribute8": "${(user.email != null && user.email != '') ? 'O365' : ''}",
        "proxyAddresses": "${(user.email != null && user.email != '') ? 'O365' : ''}",
        "extensionAttribute13": "${null!=user.customproperty61 && !user.customproperty61.isEmpty() ? user.customproperty61 : ''}",
      },
      "baseDn": "OU=Users,OU=PPD,OU=SAVIYNT,OU=IDAAS,OU=BV,DC=${user.customproperty51.toLowerCase()},DC=bvcorp,DC=corp",
      "password": "${password}"
    }
  ]
}
 
Appreciate any suggestion in this regard.

Regards,

Christian

3 REPLIES 3

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @bchrist,

There is no attribute user.mail in user object, please use user.email.

sudeshjaiswal_0-1695187305234.png

Please use the below code :- 
{
"objects": [
{
"objectClasses": [
"user",
"top",
"Person",
"OrganizationalPerson"
],
"attributes": {
"sn": "${user.lastname}",
//"sAMAccountName": "${task.accountName}",
//"sAMAccountName": "${user.systemUserName}",
"cn": "${cn.replace(',', '\\,')}",
"userAccountControl": 512,
"c": "${user.country}",
"company": "BU=${user.customer.customername}",
"department": "${user.customer.description} [${user.customer.customername}]",
"displayName": "${user.displayname}",
"employeeID": "${user.employeeid}",
"employeeType": "${user.employeeType}",
"givenName": "${user.firstname}",
"l": "${user.location}",
"extensionAttribute11": "${user.email != null && user.email != '' ? 'sync' : ''}",
"extensionAttribute1": "${user.customer.customproperty12}",
"extensionAttribute2": "${user.customer.customproperty14}",
"extensionAttribute3": "${user.customer.customproperty16}",
"extensionAttribute6": "${user.customer.customproperty25}",
"extensionAttribute5": "${user.customer.customproperty26}",
"preferredLanguage": "${user.customproperty34 != null ? user.customproperty34 : null}",
"telephoneNumber": "${user.phonenumber}",
"mobile": "${user.secondaryPhone}",
"title": "${user.title}",
"manager": "${managerAccount.accountID}",
"mail": "${user.email}",
"userPrincipalName": "${(user.email != null && user.email != '') ? user.email : user.firstname.toLowerCase()+'.'+user.lastname.toLowerCase()+'@bureauveritas.com'}",
"mailNickname": "${(user.email != null && user.email != '') ? user.email.replaceAll('@..*','') : ''}",
"extensionAttribute8": "${(user.email != null && user.email != '') ? 'O365' : ''}",
"proxyAddresses": "${(user.email != null && user.email != '') ? 'O365' : ''}",
"extensionAttribute13": "${null!=user.customproperty61 && !user.customproperty61.isEmpty() ? user.customproperty61 : ''}",
},
"baseDn": "OU=Users,OU=PPD,OU=SAVIYNT,OU=IDAAS,OU=BV,DC=${user.customproperty51.toLowerCase()},DC=bvcorp,DC=corp",
"password": "${password}"
}
]
}

Thanks,

If you find the above response useful, Kindly Mark it as "Accept As Solution".

yes in fact; we have already fix the issue.

Kramerica
New Contributor II
New Contributor II

@bchrist  Can you please provide details on how you resolved this issue? Thanks for your help in advance.