Error (Response code 50, LDAP_INSUFFICIENT_ACCESS)

System.DirectoryServices.Protocols.DirectoryOperationException: The user has insufficient access rights.
   at System.DirectoryServices.Protocols.LdapConnection.ConstructResponse(Int32 messageId, LdapOperation operation, ResultAll resultType, TimeSpan requestTimeOut, Boolean exceptionOnTimeOut)
   at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)
   at Pleasant.Identity.DirectoryServices.Ldap.LdapDirectoryConnection`1.SetPassword(DirectoryUser directoryUser, String originalPassword, String newPassword)
2xxx-xx-1x xx:59:0x.xxxx ****.DirectoryServices.Ldap.LdapDirectoryConnection`1 Response Code: 50, Modify response details: 00000005: SecErr: D*******, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0

solution

Assign enough permissions to the service account or user account as the case may be

links
https://www-01.ibm.com/support/docview.wss?uid=swg21214189
https://info.pleasantsolutions.com/index.php?title=Documentation/Pleasant_Password_Server/J._User_Administration/Reset_Users/Self-Service_Password_Reset_Enrollment_(Enterprise%2b_and_Reset_Server)