We are facing an issue with email duplication across multiple domains within a single forest setup. We have configured 11 different sources per domain, and our current cloud rule is intended to ensure email uniqueness by appending a unique counter to the first name if the same first name and last name combination already exists.
Example:
If the email prefix “Siva.Krishna” already exists, the rule should create “Siva1.Krishna” for a new user with the same name.
Current Issue:
Our current implementation only checks for email duplication within each individual domain. This leads to duplicate email addresses being created across different domains. For instance, “[email protected]” and “[email protected]” can both exist, which violates our uniqueness requirement across all domains.
Objective:
We need assistance to modify our cloud rule or approach so that it checks for email uniqueness across all 11 domains and ensures no duplicates are created, regardless of the domain.
I think you might need to check with “smtp” as well as the “sip” too, in isUnique() method.
List searchValues = new ArrayList(Arrays.asList(new String[] {
"smtp:" + emailPrefix + "@", "sip:" + emailPrefix + "@"
}));
Just append this.
Try to use “accountAttributes” instead of “identityAttributes”. Also, in isunique() method → try to check for the generated email value is existing in email Identity Attribute of all the identities belonging to that IP.
Create Email Prefix and Email Suffix Identity attributes
Make Email Prefix as searchable
Generate email prefix in your desired format, don’t attempt to apply uniqueness at Identity level which won’t work all the times. Use firstValid Transform, read mail from AD, if no AD account then only generate email.
Use Account Profile Attribute Generator Rule for email attribute, concat email prefix, uniqueness and email suffix
Check the uniqueness using countIdentitiesBySearchableIdentityAttribute method.