I am using ForgeRock cloud and want to make email id as unique attribute for identities. No identity should be created with similar email id which is already existing in identity store. How to achieve this?
I think you can use the existing policies valid-username and valid-email-address-format for the email address attribute in the managed objects.
You can enable uniqueness for any attribute using validation policies in IDM (unique) which is OOTB. Use IDM native console and navigate to mail attribute by following below steps.
- Platform UI → Native Consoles → Identity Management
- Go to Configure → Managed Objects → Choose your user object (where mail attribute is present - alpha_user OOTB).
- Click on the mail attribute and then click on Validation. Now add unique policy to the mail attribute.
Test by creating a user with same email id which already exists.
Refer ForgeRock Documentation for OOTB validation policies: Apply policies to managed objects :: ForgeRock Identity Cloud Docs
You can also write your own validation policy and import.
Hi @sandeep.dommari , thanks for your reply.
If I am adding unique policy in validation it resolves my problem while creating identities and no identity is created with similar email id.
But then when I try to login into the journey it does not allow me to login and every time I get message that mail should be unique even if only this single mail exists in the repository.
Please let me know how to resolve this issue.