AD Create Account JSON with Service Account

 -defination of critical apps

- audit issue



 

{

  "accountExpires": "0",

  "cn": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? task.accountName : usersObj?.displayname}",

  "co": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.country}",

  "department": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.departmentname}",

  "displayName": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? task.accountName : usersObj?.displayname}",

  "employeeID": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.employeeid}",

  "employeetype": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? 'Service Account' : usersObj?.employeeType}",

  "givenName": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? 'SVC' : usersObj?.firstname}",

  "middleName": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.middlename}",

  "l": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.city}",

  "st": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.state}",

  "company": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.companyname}",

  "telephonenumber": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.secondaryPhone}",

  "manager": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? ServiceAccountOwnerMap.get('USEROWNERS')?.get('1')?.collect{it.customproperty29?.toString()}[0] : managerAccount.customproperty22}",

  "mobile": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.phonenumber}",

  "mail": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.email}",

  "name": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? task.accountName : usersObj?.displayname}",

  "objectClass": [

    "top",

    "person",

    "organizationalPerson",

    "user"

  ],

  "sAMAccountName": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.username}",

  "sn": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? 'SerAcc' : usersObj?.lastname}",

  "title": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.title}",

  "userPrincipalName": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? task.accountName.replaceAll('\\s+', '-').toLowerCase() + '@ewec.local' : usersObj?.email}",

  "userAccountControl": "544",

  "physicalDeliveryOfficeName": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.companyname}",

  "msDS-cloudExtensionAttribute1": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.customproperty3}",

  "msDS-cloudExtensionAttribute2": "${ServiceAccountOwnerMap.get('ServiceAccountType') == 'Service Account' ? null : usersObj?.startdate}"

}

 

Comments

Popular posts from this blog

Enhanced Query - To Update Account Status and Name

Connection Config - STATUS_THRESHOLD_CONFIG

SQL - Connection table