Description attribute should be set in AD

Ekata
New Contributor II
New Contributor II

Hi Team,

We have a requirement to update the description from Saviynt to AD while the account is disabled.

I have achieved the first part of the requirement, however the full requirement is "the description attribute should be set to: !DepartingOutOfOffice - clear content on <today+30>, delete on <today+180>".

Can we get the date set in disableaccountjson AD connection which gets cleared after 30 days and will be deleted entirely after 180 days.

Logic used now:{
"userAccountControl": "514",
"deleteAllGroups": "No",
"description": "${if(user?.employeeclass.toString().startsWith('V')&&user?.employeeclass.toString().startsWith('EV')){'!DepartingOutOfOffice'}}",
"adminDescription": "",
"streetAddress": "",
"l": "",
"postalCode": "",
"co": "",
"c": "",
"company": "",
"st": "",
"moveUsertoOU": "${if(user?.customer?.id==4){'OU=Contractors,OU=NonEmployees,OU=Quahog,OU=Americas,DC=BAIN,DC=com'}else if(user?.employeeclass.toString().startsWith('V')&&user?.employeeclass.toString().startsWith('V')){'OU=!DepartingOutOfOffice,OU=Alumni,OU=Global,DC=BAIN,DC=com'}else if(account?.accountID?.toString().indexOf('OU=Elevated')!= -1){'OU=Elevated Accounts,OU=Global,DC=BAIN,DC=com'}else if (account?.accountID?.toString().indexOf('OU=Cloud Administrator')!= -1){'OU=Cloud Administrator Accounts,OU=Azure,OU=Resources,OU=Global,DC=BAIN,DC=com'}else{'OU=Quahog,OU=Americas,DC=BAIN,DC=com'}}"
}

Please advise.

Regards,

Ekata

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

You can create technical rule / analytics report for deletion 😕 disabling account after certain days

Yes we already have it in place to remove it after 180 days.. I just need to add the function of clearing the description from AD after 30 days. Can we do that?

Regards,

Ekata

You can trigger update account tasks from analytics actionable report

Thanks. I can do that

Ekata
New Contributor II
New Contributor II

"description": "${if(user?.employeeclass.toString().startsWith('V')&&user?.employeeclass.toString().startsWith('EV')){'!DepartingOutOfOffice'}}", We need to remove the bold letters in description once it reaches 30 days in that particular OU.

Ekata
New Contributor II
New Contributor II

Hi Team,

I have updated the analytics to remove the description but how can we update the json to get the description as "!DepartingOutOfOffice - clear content on <today+30>, delete on <today+180>" with the mentioned date/time interval

Please advise.

Regards,

ekata

Ekata
New Contributor II
New Contributor II

"description":"${if(user?.employeeclass.toString().startsWith('V')&&user?.employeeclass.toString().startsWith('EV')){'!DepartingOutOfOffice - clear content on' +{StatementDate = Calender.getInstance();StatementDate.add(Calender.DAY_OF_MONTH,+30);StatementDate.format('yyyy-MM-dd')}}}",

Tried this but can not update it correctly.

Error: Error while Update operation for account-9999123091 in AD - Error parsing JSON

Seems issue with date function

Can you advise the correct function to achieve it.

Regards,

Ekata

You have error is json validate json using json validator

Thanks. I could get the correct function.