Multiple OOB reclamation rule for Microsoft with same values

Rakesh18081
Tera Expert

I was going through the reclamation rule and found that there are 6 reclamation rules with Name Microsoft 365.

Only difference is days before auto reclamation which is either 14 or 3 days. Still there are 3 duplicates.

Does anyone know why we have duplicates?

 

3 REPLIES 3

dreinhardt
Tera Sage

Hi @Rakesh18081,

 

checked my instance and found only one rule per integration product.

 

Best, Dennis

Should my response prove helpful, please consider marking it as the Accepted Solution/Helpful to assist closing this thread.

Rakesh18081
Tera Expert

@dreinhardt Please see the below screenshot, there are 7 now are one recently created on 19th June as well.

Rakesh18081_0-1750931926522.png

 

Can you check when all these rules were created and when the scheduled job 'SAM - Import M365 User Subscriptions' was executed?
Can you please check if anyone is manually deleting data in samp_m2m_rule_product table. Deleting data in this table, will lead to duplicate reclamation rules to be created as well on every Import M365 subscriptions job execution. 

To fix the issue. Follow steps below in order.

1. Delete all existing reclamation rules for Microsoft 365. You can delete the rules from UI.
2. All the corresponding reclamation candidates become invalid as the rule is cleared and we can run the below script in background to close cancel them.

var rcGr = new GlideRecord('samp_sw_reclamation_candidate');
rcGr.addNullQuery('reclamation_rule');
rcGr.addQuery('state', 11);
rcGr.setValue('state', 17);
rcGr.setWorkflow(false);
rcGr.updateMultiple();

3. Now, run the Import M365 User Subscriptions job. This will autocreate reclamaiton rule, the corresponding products in samp_m2m_rule_product table.