Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/16/2024 04:33 AM - edited 05/16/2024 04:34 AM
Hi Team,
We are trying to update the Active directory manager attribute with the DN of the user's manager via update account JSON
Please specify how we can check for manager's status as active and update the attribute as well
PFB the json for update account:
{${if((user?.leaveStatus=='LEAVE')) '\"extensionAttribute4\" : \"exclude\"' else '\"extensionAttribute4\" : \"\"'},
${if((user?.leaveStatus=='LEAVE')) '\"extensionAttribute11\" : \"exclude\"' else '\"extensionAttribute11\" : \"\"'},
${if((user?.country =='US')) '\"msExchExtensionAttribute24\" : \"US\"' else '\"msExchExtensionAttribute24\" : \"INTL\"'},
${if((user?.employeeType =='Employee')) '\"msExchExtensionAttribute23\" : \"FTE\"' else '\"msExchExtensionAttribute23\" : \"NE\"'}
${if((user?.customproperty32!=null && user?.customproperty32!='')) ',\"co\" : \"'+user.customproperty32+'\"' else ''}
${if((user?.country!=null && user?.country!='')) ',\"c\" : \"'+user.country+'\"' else ''}
${if((user?.title!=null && user?.title!='')) ',\"title\" : \"'+user.title+'\"' else ''}
${if((user?.manager!=null && user?.manager!='')) '\"manager\" : \"'+managerAccount?.comments+'\"' else '\"manager\" : \"\"'}
${if((user?.state!=null && user?.state!='')) ',\"st\" : \"'+user.state+'\"' else ''}
${if((user?.customproperty16!=null && user?.customproperty16!='')) ',\"division\" : \"'+user.customproperty16+'\"' else ''}
${if((user?.locationdesc!=null && user?.locationdesc!='')) ',\"physicalDeliveryOfficeName\" : \"'+user.locationdesc+'\"' else ''}
${if((user?.street!=null && user?.street!='')) ',\"streetAddress\" : \"'+user.street+'\"' else ''}
${if((user?.departmentname!=null && user?.departmentname!='')) ',\"department\" : \"'+user.departmentname+'\"' else ''}
${if((user?.customproperty33!=null && user?.customproperty33!='')) ',\"countryCode\" : \"'+user.customproperty33+'\"' else ''}
${if((user?.customproperty17!=null && user?.customproperty17!='')) ',\"company\" : \"'+user.customproperty17+'\"' else ''}
${if((user?.locationnumber!=null && user?.locationnumber!='')) ',\"extensionAttribute13\" : \"'+user.locationnumber+'\"' else ''}
${if((user?.customproperty27!=null && user?.customproperty27!='')) ',\"extensionAttribute8\" : \"'+user.customproperty27+'\"' else ''}
${if((user?.customproperty27!=null && user?.customproperty27!='')) ',\"extensionAttribute14\" : \"'+user.customproperty27+'\"' else ''}
${if((user?.employeeid!=null && user?.employeeid!='')) ',\"extensionAttribute1\" : \"'+user.employeeid+'\"' else ''}
${if((user?.phonenumber!=null && user?.phonenumber!='')) ',\"telephoneNumber\" : \"'+user.phonenumber+'\"' else ''}
${if((user?.customproperty12!=null && user?.customproperty12!='')) ',\"extensionAttribute6\" : \"'+user.customproperty12+'\"' else ''}
${if((user?.city!=null && user?.city!='')) ',\"l\" : \"'+user.city+'\"' else ''}
${if((user?.customproperty13!=null && user?.customproperty13!='')) ',\"postalCode\" : \"'+user.customproperty13+'\"' else ''}
}
Thanks
Abdul Gaffar
05/16/2024 06:17 AM
@Abdul_Gaffar What do you want to do if the manager is Inactive in EIC? Also, do you want to check the manager's AD account status?
05/16/2024 07:07 AM
@vivek9237 , we want to check manager's saviynt status ,like their user profile is active or not
However , AD account status works along with useraccountcontrol which might vary
Thanks
Abdul Gaffar
05/16/2024 07:30 PM
${if((user?.manager!=null && user?.manager!='' && user?.statuskey==1)) '\"manager\" : \"'+managerAccount?.comments+'\"' else '\"manager\" : \"\"'}
@vivek9237 typo fixed
05/16/2024 08:58 AM
@Abdul_Gaffar You have to put an additional check for user status in the if condition -
${if((user?.manager!=null && user?.manager!='' && user?.statuskey==1L)) '\"manager\" : \"'+managerAccount?.comments+'\"' else '\"manager\" : \"\"'}
user.statuskey==1 means Active status
05/16/2024 08:13 PM
@rushikeshvartak Thanks. Actually the variable `statuskey` in user binding variable is actually of type long. That's why I have made it a practice to mention the character `L` with the number.
@Abdul_Gaffar Btw both of the expression will work.