How to get the firstname lastname email of an Identity in SailPoint IIQ?

firstname lastname email of an Identity in SailPoint

In this Sailpoint tutorial post, we will learn how to get the firstname, lastname, Email attributes of an Identity in SailPoint IIQ?

import java.util.Map;
import java.util.HashMap;
import sailpoint.api.SailPointContext;
import sailpoint.object.Identity;

public Map getIdentityAttributes(String Identity) {
Map idenAttributeMap=new HashMap();
Identity iden=context.getObjectByName(Identity.class,identity);

//print all attributes of an identity.
//return iden.toXml();

//get FirstName of an Identity
if(iden.getFirstName() !=null) {
} else {

//get LastName of an Identity
if(iden.getLastName() !=null) {
} else {

//get email of an Identity
if(iden.getEmail() !=null) {
} else {
//call the method by passing any identity employee id

We can get firstName , email from Identity object. In above example, One method is created.Inside method we are getting identity object by passing employeeID. You can see all the attributes of an identity by calling iden.toXml();

FirstName, Lastname, email attributes can be get by using iden.getFirstName() , iden.getLastName() and iden.getEmail().