Add a check in the rule if email address exists in Active Directory before creating a new email

Which IIQ version are you inquiring about?

Version 8.1

Share all details related to your problem, including any error messages you may have received.

Hello Everyone,
I created a QuickLink that will create an email address for the identities whose email is null and empty in Sailpoint. But somehow there are some identities that has email in Active Directory but that email is not syncing into Sailpoint.
I want to add a check if email is null in both Active Directory and Sailpoint then only create an email. I have added a check for Sailpoint but don’t know how to do check for Active Directory.
Any help suggestion will be helpful;

if(emailAddress != null && !emailAddress.isEmpty())
         workflow.put("confirmMsg",emailAddress);
        else
         workflow.put("confirmMsg",""+identity.getAttribute("email")+" existed already for this identity - "+identity.getName());

Hey Rita,

Usually for this scenario what I have done is listed below:

i. Confirm if the userPrincipalName and email attribute on AD and atleast one of these attribute is declared within the schema.
ii. Add a singleAccountAggregation method in a common rule library.
iii. Add a workflow step wherein you would be forcing a single account aggregation and check if the email attribute is already present.
iv. If its still null to then move to the next step within your workflow to either provision the email and or end with a warning and or success message informing the requestee that the e-mail has already been provisioned.

Thanks,
Aman

1 Like

Another option is to make the email-address searchable account attribute (gear->Global Settings->Account Attributes). Using this you can search for an unique link with the email-address. If not found, you can use it as it is not in use :slight_smile:

if (context.getUniqueObject(Link.class, (Filter.and(Filter.ignoreCase(Filter.eq("email", email_adress_to_test)),Filter.eq("application.name","Active Directory")) == null) {

The usages of getUniqueObject is possible since all the email-addresses should be unique and there are no 2 links with the same email-address :slight_smile:

I hope this helps,

– Remold

2 Likes

If you need to check directly in Active Directory, read more about in javadoc:

  • sailpoint.connector.ConnectorFactory.getConnector
    • iterateObjects
2 Likes

Update on this POST!

Thank you everyone for your contribution. The workflow calls an Email Provisioning PowerShell Script . I added a condition like if(mailbox exist) {return mail box} else {create mailbox}. It looks like working so far.

1 Like

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