Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create identity snapshot programmatically

Create identity snapshot programmatically

Maintain identity histories option in refresh identity task update identity history by creating the identity snapshot. This may cause performance issue, however there are couple of cases like we need to create identity snapshot based on the life cycle events like in case of termination or transfer. Here is sample code which can be used to create identity snapshot programmatically.

String identityName = "<name of the identity in IdentityIQ>";
Identity identity = context.getObjectByName(Identity.class, identityName);       
IdentityArchiver identityArchiver = new IdentityArchiver(context);       
IdentitySnapshot identitySnapshot = identityArchiver.createSnapshot(identity);       
Labels (1)

Thanks for this, I found it to be very helpful.

Would it be possible to also restore an identity from snapshot programmatically?

If yes, please can you illustrate how.



Whats the header import for IdentityArchiver class ?

Hello @sen_rohit90, the header imports are:


import sailpoint.object.Identity;
import sailpoint.api.IdentityArchiver;
import sailpoint.object.IdentitySnapshot;


If I want restore information from last snapshot in an Identity. How I could do this?




When a snapshot is taken for an account and the account goes through a leaver process, is that information from the snapshot saved?  If so how long is it stored?  If needed could that snapshot be used if the account is reactivated?

Version history
Revision #:
2 of 2
Last update:
‎Jun 22, 2023 01:11 PM
Updated by: