Why do I receive a 'constraint violation' error when creating or updating users/accounts?
search cancel

Why do I receive a 'constraint violation' error when creating or updating users/accounts?

book

Article ID: 74313

calendar_today

Updated On: 02-08-2022

Products

CA Identity Manager CA Identity Governance CA Identity Portal CA Identity Suite

Issue/Introduction



When creating or modifying users in Identity Manager, sometimes the result is a Constraint Violation error. What does this mean and how to avoid it? 

Environment

This applies to LDAP user stores or endpoints. 

Resolution

A constraint violation is simply a grammatical error or a value that does not adhere to the LDAP schema. 
For example , you may be creating a user and providing characters that are not allowed for an attribute. 

Example: The telephone number attribute has schema that allows only numbers. 
However, if you have entered text such 'test' in there, you would get a constraint violation.

Example: An attribute has a size limit of 5 chars. 
If you enter a value larger than that, you would get a constraint violation. 

Example: You have an attribute defined as single valued. 
You use Policy xpress to update the value. But instead of clearing the existing value, you are using Add function. This adds another value to the attribute which is only allowed if the attribute is multi-valued. So you would get a constraint violation in this instance too. 

There are many more examples, but the first thing to do when receiving a constraint violation is to check the data being submitted. 
the data is being rejected due to schema violations.