Custom Report for identity snapshot

Hi Team,

We had a requirement to create a custom report, where in custom report we need to select the identity name and the identity snapshot created date, once selected we should get a report with related identity snapshot details like extra entitlements and application account details in the report.

For each identity we will be having multiple identity snapshots created, how we can filter the snapshots for particular time frame.

can you provide some suggestions.
Thanks in advance.

Hi @Ramya2018 ,

Do you need all the Identity Snapshots related to particular identity or Particular Snapshot or latest snapshot of every Identity?

I think you can use Filter and QueryOption for this, but if you clarify more on requirement it would be good.

As dheeraj mentioned we can able to achieve this by using Filter & QueryOptions objects.

Below is sample code snippet to retirve the identiti’s last 1 month snapshots.

	 SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");  
    Date date = new Date(); 
    Calendar cal = Calendar.getInstance();
    cal.add(Calendar.MONTH, -1);
    Date result = cal.getTime();
             QueryOptions ops = new QueryOptions(); 
			  Filter F1=  Filter.eq("identityName", username);
			Filter F2=Filter.ge("created", result);
			 Filter F=Filter.and(F1, F2);
                ops.addOrdering("created", false);

ops.addFilter(F);
Iterator snapshots = context.search(IdentitySnapshot.class, ops);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.