Createupdateaccount task for AD not triggering using user update rule

SumathiSomala
Regular Contributor II
Regular Contributor II

Hi team i have created one user update rule trigger create update account task for AD

If change user statuskey from 1 to 0 pending task should create for update account.

But no task is created.

Update account JSON

{
"sn": "${user.lastname}",
"cn":"${cn}",
"manager": "${managerAccount.accountID}",
"title": "${user.title}",
"department": "${user.departmentname}",
"displayname": "${user.displayname}",
"employeetype": "${user.employeeType}",
"physicaldeliveryofficename": "${user.location}",
"givenName": "${user.firstname}",
"l": "${user.city}",
"ipPhone": "${user.customproperty25}",
"postalCode": "${user.customproperty27}",
"telephoneNumber": "${user.phonenumber}",
"description": "${user.title}",
"moveUsertoOU": "${if(user.departmentname.equals('IT/Application Support')){'OU=IT,OU=XX Users,DC=XX,DC=LOCAL'}else if(user.customproperty7.equals('Yes')){'OU=LOA,OU=XX Users,DC=XX,DC=LOCAL'}else if(user.statuskey.equals(0)){'OU=On Hold User Accounts,OU=XX Users,DC=XX,DC=LOCAL'}else{'OU=xx,OU=XX Users,DC=XX,DC=LOCAL'}}
}

Userupdaterule:

SumathiSomala_0-1694435012723.png

Also i can see rule triggered under user update history

SumathiSomala_0-1694437344282.png

 

Could anyone help me?

5 REPLIES 5

pmahalle
Valued Contributor II
Valued Contributor II

Hi @SumathiSomala ,

Can you checked the Include Inactive User and Accounts in Update Account Rules configuration under Global Configurations-->Rules and check once.

pmahalle_0-1694438742218.png


Regards,

Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.

SumathiSomala
Regular Contributor II
Regular Contributor II

Thanks @pmahalle 

Update account task is getting created and moved to completed tasks after WSRETRY job

but OU is not updating.

{
"sn": "${user.lastname}",
"cn":"${cn}",
"manager": "${managerAccount.accountID}",
"title": "${user.title}",
"department": "${user.departmentname}",
"displayname": "${user.displayname}",
"employeetype": "${user.employeeType}",
"physicaldeliveryofficename": "${user.location}",
"givenName": "${user.firstname}",
"l": "${user.city}",
"ipPhone": "${user.customproperty25}",
"postalCode": "${user.customproperty27}",
"telephoneNumber": "${user.phonenumber}",
"description": "${user.title}",
"moveUsertoOU": "${if(user.departmentname.equals('IT/Application Support')){'OU=IT,OU=XX Users,DC=XX,DC=LOCAL'}else if(user.customproperty7.equals('Yes')){'OU=LOA,OU=XX Users,DC=XX,DC=LOCAL'}else if(user.statuskey.equals(0)){'OU=On Hold User Accounts,OU=XX Users,DC=XX,DC=LOCAL'}else if (user.location.equals('Test Users') && user.statuskey.equals(1)) {'OU=Saviynt_Test,OU=Test Users,OU=XX Users,DC=XX,DC=LOCAL'}else{'OU=XX Admin Accounts,OU=XX Admin,DC=XX,DC=LOCAL'}}"
}

 user.statuskey.equals(0):This condition should satisfy but user.location.equals('Test Users') && user.statuskey.equals(1)) is executed.

pmahalle
Valued Contributor II
Valued Contributor II

@SumathiSomala ,

Can you try below and check:

"moveUsertoOU": "${if(user.departmentname.equalsIgnoreCase('IT/Application Support')){'OU=IT,OU=XX Users,DC=XX,DC=LOCAL'} else if(user.customproperty7.equalsIgnoreCase('Yes')){'OU=LOA,OU=XX Users,DC=XX,DC=LOCAL'} else if(user.statuskey ==0){'OU=On Hold User Accounts,OU=XX Users,DC=XX,DC=LOCAL'} else if (user.location.equalsIgnoreCase('Test Users') && user.statuskey ==1) {'OU=Saviynt_Test,OU=Test Users,OU=XX Users,DC=XX,DC=LOCAL'}else{'OU=XX Admin Accounts,OU=XX Admin,DC=XX,DC=LOCAL'}}"

 


Regards,

Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.

SumathiSomala
Regular Contributor II
Regular Contributor II

Tried @pmahalle 

This time else condition executed

"moveUsertoOU": "${if(user.departmentname.equalsIgnoreCase('IT/Application Support')){'OU=IT,OU=XX Users,DC=XX,DC=LOCAL'} else if(user.customproperty7.equalsIgnoreCase('Yes')){'OU=LOA,OU=XX Users,DC=XX,DC=LOCAL'} else if(user.statuskey ==0){'OU=On Hold User Accounts,OU=XX Users,DC=XX,DC=LOCAL'} else if (user.location.equalsIgnoreCase('Test Users') && user.statuskey ==1) {'OU=Saviynt_Test,OU=Test Users,OU=XX Users,DC=XX,DC=LOCAL'}else{'OU=XX Admin Accounts,OU=XX Admin,DC=XX,DC=LOCAL'}}"

Any other suggestions?

SumathiSomala
Regular Contributor II
Regular Contributor II

Thanks @pmahalle 

Now it is working fine..