Configure unique claims¶
WSO2 Identity Server can be configured to retain the uniqueness of user claims. This allows you to keep a user claim value as a unique value within or across all userstores.
Follow the steps below to configure WSO2 Identity Server.
-
Open the
deployment.toml
file in the<IS_HOME>/repository/conf
folder and add the following configurations.[identity_mgt.user_claim_update.uniqueness] enable = true scope_within_userstore = false # Optional.
To keep the uniqueness within a userstore, set
scope_within_userstore
astrue
. -
Restart WSO2 Identity Server and access the Management Console (
https://<IS_HOST>:<PORT>/carbon
) . -
From the list of claims, select the claim you want to configure to keep it unique.
-
Click Edit to open the claim edit page.
-
Click
Add Claim Property
and add an additional claim property as follows.Property Name Property Value isUnique true -
Finally, click
Update
to save the additional claim property.
Now you can check and verify the functionality by adding users with an existing claim value or updating the user claim value of an existing claim.
Top