04/03/2023 05:48 AM
User Update Rule and Technical rule attached to it is not triggering when user is updated from API calls.
The user should provision with AD account and Access as part of Birthright access
User Update Rule
((##a.startdate isupdated##) AND (a.statuskey=1) AND (DATEDIFF(a.startdate,Curdate()) < 21))
Technical Rule
( Users.customproperty14 =51 OR Users.customproperty14 =52 OR Users.customproperty14 =53 OR Users.customproperty14 =54 OR Users.customproperty14 =1 OR Users.customproperty14 =2 OR Users.customproperty14 =3 ) AND ( Users.firstname !=null AND Users.lastname !=null AND Users.email !=null AND Users.country !=null AND Users.customproperty6 !=null) AND ( Users.customproperty15 like '%Yara ISS%' OR Users.customproperty15 like '%HRM%' ) AND ( Users.username not like '%aa%' ) AND ( Users.statuskey =1 )
04/03/2023 06:30 AM
Did you make sure when you create the user update rule ( you need to select from when this rule can be kicked off, u need to select when user is updated from Api )
If the above is configured, then please check if you are sending the attribute as false - checkrules ( if not sent default it is true ).
Thanks
Darshan
04/03/2023 07:59 AM
Hi Darshan,
Both are configured correctly from my end.
The User Update Rule and Technical rule is triggering fine when we do the update from UI and for this change to work, I have created another user update rule with "select when user is updated from Import". The provisioning tasks are triggering fine without any issues.
04/03/2023 08:03 AM - edited 04/03/2023 08:04 AM
Okay, Do you see anything in the logs when you update from Api,
Also send me the body of the postman you are calling to update the users as well
if still facing issues, this may need to triage the logs to check further which can you raise a FD and support team would check further.
Thanks
Darshan
04/04/2023 03:12 AM
Hi Darshan,
We are not updating users from postman. The update is happening at ServiceNow DB and we are reconciling the data through the API call.
Thanks and Regards,
Kumar Vadlamudi
04/04/2023 03:23 AM
Okay, you can do that via postman once and see or you can check the logs when the call is happening to check what is populating in the logs.
Ideally this to trigger the rule ( Also in user update history are you able to see the rule run when user is updated )
Thanks
Darshan
04/04/2023 04:06 AM
Hi Darshan,
Please find my comments below.
Ideally this to trigger the rule ( Also in user update history are you able to see the rule run when user is updated). The user start date is updating for the user but the user update rule is not triggering. It is not showing in the user update history.
Thanks and Regards,
Kumar Vadlamudi
04/04/2023 04:09 AM
Looks like we need to triage it deeper, You can raise a FD ticket with logs as well, so that support team can check further
Thanks
Darshan
04/24/2023 06:30 AM
Hi Darshan,
Could you please confirm if we need to run the "CustomerRuleRunJob" to trigger the user update rules. Please confirm if this needs to be run before or after the userimport from API call.
Regards,
Kumar
06/08/2023 08:55 AM
No Rulerunjob is a automatic trigger, if during import if you have put checkrules=true then it will run the user update rule once the user is updated.
Thanks
Darshan