How to Check if your Email Attribute is Unique on User Create?
Navigate to Policy Xpress -> Create Policy Xpress Policy -> Create a new object of type Policy Xpress
This screen will show up:
<Please see attached file for image>
For this example, the Policy is going to be named “Unique Email”.
<Please see attached file for image>
For the Events tab, choose to evaluate the event before it happens so it won’t Create the User. If “After” was selected, the user would be created in Identity Manager and then it would throw the exception.
<Please see attached file for image>
Two data elements would need to be created. In this example, the elements are going to be named “Email Attribute” and “Unique Email Checker”. The “Email Attribute” is going to use the current user attribute at time of the CreateUserEvent. This is when the Unique Email Checker element would take the “Email Attribute” and check against all users in Identity Manager to see if it already exists in Identity Manager.
<Please see attached file for image>
<Please see attached file for image>
At the end of following the previous steps, this is how your “Data” tab should look.
<Please see attached file for image>
In the Action Rules, add an “Action Rule Condition” and “Add Actions”. Once the Unique Email Checker equals a value of “false”, this output verifies that the attribute “Email” is not unique. Then the “Add Action” policy will trigger and “Throw an Exception”. This exception message would show in the “View Submitted Tasks”.
<Please see attached file for image>