I read that as the getIdentityFromIdOrName() function does not exist in our environment when called with 2 String arguments. Yet, when we run it through the rule validator, it comes out clean.
Any idea with what is wrong? This is in our Dev tenant.
To get a identity, is there any particular use case for using getIdentityFromIdOrName.
This method is not supported in ISC.
Try using,
if (plan!=null) {
List accountRequests = plan.getAccountRequests();
if (accountRequests!=null) {
for (AccountRequest accountRequest : accountRequests) {
AccountRequest.Operation op = accountRequest.getOperation();
// This is the first way of retrieving an identity
Identity identity = plan.getIdentity();
String nativeIdentity = accountRequest.getNativeIdentity();
if(identity.getAttribute("firstname")!=null) {firstName = (String) identity.getAttribute("firstname");}
// This is the optional way of retrieving an identity will be the continuation
// Get internal ID on run
String id = null;
if (identity != null) {
id = identity.getId();
}
// Fetch Identity object by internal ID
Identity freshIdentity = null;
if (internalId != null) {
freshIdentity = idn.getIdentityById("id");
}
if (freshIdentity != null) {
String email = freshIdentity.getEmail();
log.info("Email: " + email);
} else {
log.warn("Identity not found for nativeIdentity: " + nativeIdentity);
}
// rest of the code
}
}
}