Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Update manager DN via update account JSON

Abdul_Gaffar
New Contributor II
New Contributor II

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

5 REPLIES 5

vivek9237
Regular Contributor
Regular Contributor

@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?

Regards,

Vivek Mohanty


If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Abdul_Gaffar
New Contributor II
New Contributor II

@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

${if((user?.manager!=null && user?.manager!='' && user?.statuskey==1)) '\"manager\" : \"'+managerAccount?.comments+'\"' else '\"manager\" : \"\"'}

@vivek9237  typo fixed


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

vivek9237
Regular Contributor
Regular Contributor

@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

Regards,

Vivek Mohanty


If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

vivek9237
Regular Contributor
Regular Contributor

@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.

Regards,

Vivek Mohanty


If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.