We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Add attributes

RCreddy
New Contributor
New Contributor

Hello Team,

We have a requirement for adding the attributes where two  attributes needs to be added (attribute 1, attribute 2) for only particular OU

Attribute 1 needs to be populated with User type

Attribute 2 needs to be populated with their first initial and last name. (up to a maximum of 10 characters) ie: Donna Brandenburg would be dbrandenbu (This is for OU=XYZ users only)

Can someone help on this. Please let me know if any thing required from my end

Thanks in Advance

3 REPLIES 3

StephenDay
Saviynt Employee
Saviynt Employee

If the OU for provisioning is being provided from the User Profile, then IF statements can be used inside the JSON. e.g. ${user.custompropertyX == 'XYZ'?'something':'somethingelse'}

Could you please post your current working CreateAccountJSON here?

RCreddy
New Contributor
New Contributor

Hello Stephen,

Please find the current CreateAccountJSON

{
"accountExpires":"${ if (user?.enddate != null && user?.enddate != ''){10000*(user?.enddate.getTime() + 11644473600000 + 100799999)} else {9223372036854775807} }",
"cn": "${cn}",
"manager":"${if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == ''){''} else {managerAccount?.accountID}}",
"c": "${ if (user?.country == null || user?.country == '') {''} else {user?.country}}",
"department": "${ if (user?.departmentname == null || user?.departmentname == '') {''} else {user?.departmentname}}",
"displayname": "${ if (user?.preferedFirstName != null && user?.preferedFirstName != '') {'UAT'+user.preferedFirstName+' '+user.lastname} else {'UAT'+user.firstname+' '+user.lastname}}",
"employeeID": "${ if (user?.employeeid == null || user?.employeeid == '') {''} else {user?.employeeid}}",
"employeetype": "${ if (user?.employeeType == null || user?.employeeType == '') {''} else {user?.employeeType}}",
"initials": "${ if (user?.middlename == null || user?.middlename == '') {''} else {user?.middlename.substring(0,1)}}",
"importedFrom": "Saviynt Security Manager",
"UserPrincipalName": "${user?.email}",
"givenName": "${ if (user?.firstname == null || user?.firstname == '') {''} else {user?.firstname}}",
"postalCode": "${ if (user?.customproperty3 == null || user?.customproperty3 == '') {''} else {user?.customproperty3}}",
"company": "${if (user?.companyname == null || user?.companyname == '') {''} else {user?.companyname}}",
"l": "${ if (user?.city == null || user?.city == '') {''} else {user?.city}}",
"objectClass": [
"top",
"person",
"organizationalPerson",
"user"
],
"pwdLastSet": "0",
"sAMAccountName": "${user?.systemUserName}",
"sn": "${user?.lastname}",
"st": "${ if (user?.regioncode == null || user?.regioncode == '') {''} else {user?.regioncode}}",
"streetAddress": "${ if (user?.street == null || user?.street == '') {''} else {user?.street}}",
"physicalDeliveryOfficeName": "${user?.location}",
"title": "${ if (user?.title == null || user?.title == '') {''} else {user?.title}}",
"description": "${ if (user?.departmentname == null || user?.departmentname == '') {''} else {user?.departmentname}}"
}

{
"accountExpires": "${ if (user?.enddate != null && user?.enddate != ''){10000*(user?.enddate.getTime() + 11644473600000 + 100799999)} else {9223372036854775807} }",
"cn": "${cn}",
"manager": "${if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == ''){''} else {managerAccount?.accountID}}",
"c": "${ if (user?.country == null || user?.country == '') {''} else {user?.country}}",
"department": "${ if (user?.departmentname == null || user?.departmentname == '') {''} else {user?.departmentname}}",
"displayname": "${ if (user?.preferedFirstName != null && user?.preferedFirstName != '') {'UAT'+user.preferedFirstName+' '+user.lastname} else {'UAT'+user.firstname+' '+user.lastname}}",
"employeeID": "${ if (user?.employeeid == null || user?.employeeid == '') {''} else {user?.employeeid}}",
"employeetype": "${ if (user?.employeeType == null || user?.employeeType == '') {''} else {user?.employeeType}}",
"initials": "${ if (user?.middlename == null || user?.middlename == '') {''} else {user?.middlename.substring(0,1)}}",
"importedFrom": "Saviynt Security Manager",
"UserPrincipalName": "${user?.email}",
"givenName": "${ if (user?.firstname == null || user?.firstname == '') {''} else {user?.firstname}}",
"postalCode": "${ if (user?.customproperty3 == null || user?.customproperty3 == '') {''} else {user?.customproperty3}}",
"company": "${if (user?.companyname == null || user?.companyname == '') {''} else {user?.companyname}}",
"l": "${ if (user?.city == null || user?.city == '') {''} else {user?.city}}",
"objectClass": [
"top",
"person",
"organizationalPerson",
"user"
],
"pwdLastSet": "0",
"sAMAccountName": "${user?.systemUserName}",
"sn": "${user?.lastname}",
"st": "${ if (user?.regioncode == null || user?.regioncode == '') {''} else {user?.regioncode}}",
"streetAddress": "${ if (user?.street == null || user?.street == '') {''} else {user?.street}}",
"physicalDeliveryOfficeName": "${user?.location}",
"title": "${ if (user?.title == null || user?.title == '') {''} else {user?.title}}",
"description": "${ if (user?.departmentname == null || user?.departmentname == '') {''} else {user?.departmentname}}",
"extensionAttribute1":"${user?.employeetype}",
"extensionAttribute2":"${user?.firstname.substring(0,1).concat(user?.lastname).substring(0,10)}",

}


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