A constraint violation occurred. (exception from hresult: 0x8007202f)

When calling the System.DirectoryServices.DirectoryEntry.CommitChanges method, the following error can occur if one of the property values is too long or of the wrong type: A constraint violation occurred. (exception from hresult: 0x8007202f)

This can occur for example if you try to create a user account in Active Directory with a first name which is too long.

If you are using the user provisioning software XIA Automation and you enter an invalid value during the user creation process, this error will display.  You can also see the full exception in the trace log.

Screenshot showing error A constraint violation occurred
Screenshot showing error 'A constraint violation occurred'

Solution


Ensure that the values you are using to create the user account are valid according to the Microsoft documentation for Active Directory i.e. the correct type and within the length constraints.

Comments

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

LG TV turn off Quick Start in settings