I always get this error message. Recently my script still has worked, but I didn't change anything. I don't know why it suddenly crashes all the time. The problem cant be a wrong server or wrong credentials, because I can e.g. get information's from a can with pyad.aduser.ADUser.from_cn(). Thanks for [...] read more
I have problem with c# script who change user AD password, when try change password, they throw exception A constraint violation occurred. (Exception from HRESULT: 0x8007202F) Code DirectoryEntry entry = new DirectoryEntry("LDAP://domain.com", strLoginName, oldpassword.Text.ToString(), AuthenticationTypes.Secure); DirectorySearcher search = new DirectorySearcher(entry); search.Filter = "(SAMAccountName=" + strLoginName + ")"; search.SearchScope = SearchScope.Subtree; [...] read more
I get the error when trying to add users to a group. > A constraint violation occurred. (Exception from HRESULT: 0x8007202F) public string addUserToGroup(string userDN, string groupDN) { try { DirectoryEntry de = new DirectoryEntry("LDAP://localhost:389/" + groupDN); de.Username = "myUsername"; de.Password = "myPassword"; de.Properties["member"].Add(userDN); de.CommitChanges(); de.Close(); //return true; return "yes"; [...] read more
I have some C# code using System.DirectoryServices.AccountManagement that is used to allow a user to change their Active Directory user account password. It is currently using LDAP (:389) and I wanted to switch it to LDAPS (:636) for security purposes. However, when I switch to LDAPS the error messages returned [...] read more
I am trying to create a web application to reset the password based on question/answer using System.Web.Security API. I get an exception: > DirectoryServicesCOMException (0x8007202f): A constraint violation occurred" > if user provide one bad answer to the question. If I reset value of attributeMapFailedPasswordAnswerCount to not set the account [...] read more
In C# I write... DirectoryEntry computer = GetComputer(); computer.Properties["managedBy"].Value = null; computer.CommitChanges(); When I make the call to CommitChanges() it throws a COM exception A constraint violation occurred. (Exception from HRESULT: 0x8007202F) something is wrong with setting the "managedBy" property to null, but how else do you clear the property? read more