If you’re getting empty value then NativeChangeDetection is not present on the identity.
to debug this follow below steps
Enable the NativeChangeDetection on application configuration page.
Create a new lifecycle event with Native trigger event, enable the life cycle event and config the workflow.
Make changes to targeted user in end system and run the aggregation in SailPoint.
Once aggregation is completed, make sure to check the Identity object from debug page by searching with word “Native”. If it is present then NativeChangeDetection is present for that user.
If you found the triggerSnapahot on identity then run the IdentityRefresh task to trigger the native life cycle event workflow.
Note: follow the 1&2 steps, otherwise NativeChangeDetection wont work.
I have used a Workflow for my Native Change Detection Event and the below code works fine.
This event value is available as an input if you create a NCD workflow of type type=“IdentityLifecycle”. From this event you can get the nativechange list if NCD is triggered.
import sailpoint.object.NativeChangeDetection;
if(null != event){
List<NativeChangeDetection> nativeChangesList = event.getNativeChanges();
if(null != nativeChangesList && !nativeChangesList.isEmpty()) {
// Below is my custom method to process these NCDs.
processNativeChange(nativeChangesList,identityName);
}
}
In order to trigger the NCD, you need to enable on application level and check the process events when you run the refresh of that identity where native changes have been done. Without this you wont get any native change and nothing will show up.