Hello Rishav. The iterator approach you have looks right for a bulk update. One additional thing I would check before running it is whether this attribute has a source configured under Global Settings → Identity Mappings.
If the attribute is derived from an Application Attribute, Application Rule, or Global Rule, I would first confirm whether updating it directly is the intended design. IIQ uses those source mappings to derive identity attribute values, and Refresh identity attributes can update the Identity Cube based on those mappings.
If the value itself should be calculated by IIQ, it may be cleaner to implement that logic in the appropriate identity source mapping and let the normal aggregation/refresh processing maintain it.
If this is simply a custom identity attribute that you intentionally maintain through code and it has no source mapping that will recalculate it, then the batched IncrementalObjectIterator approach suggested above should be a good fit.
hi @rishavghoshacc please check below article, it will give you more idea on this. Also please use decache after every 50 or 100 record.
Generally if you are saving also then sailpoint recommend to lock the identity object and then save and then unlock. If lock then wait for some time.
Check this community Page SailPoint Compass Community
@rishavghoshacc What attribute are you setting? For one of the project, we did this using IdentityRefresh prerefresh rule.. You can create a population and assign to the task on which you need to set the attributes, then just use setAttribute to set the value.. no need to iterate or saveObject or commit transaction, and don’t return any thing. just do setAttribute that’s it..
Another advantage is, as it is refresh it can be partitioned to sped up the execution.