Platform SDK: Active Directory, ADSI, and Directory Services

Win32 Error Codes

The following table lists the LDAP error messages and their corresponding Win32 error codes for ADSI 2.0.

ADSI Error Value LDAP message Win32 message Description
0 LDAP_SUCCESS NO_ERROR Operation succeeded.
0x80070002 LDAP_NO_SUCH_OBJECT ERROR_FILE_NOT_FOUND Object does not exist.
0x80070005 LDAP_AUTH_METHOD_NOT_SUPPORTED ERROR_ACCESS_DENIED The authentication method is not supported.
0x80070005 LDAP_STRONG_AUTH_REQUIRED ERROR_ACCESS_DENIED Strong authentication is required.
0x80070005 LDAP_INAPPROPRIATE_AUTH ERROR_ACCESS_DENIED Authentication is inappropriate.
0x80070005 LDAP_INSUFFICIENT_RIGHTS ERROR_ACCESS_DENIED The user has insufficient access right.
0x80070005 LDAP_AUTH_UNKNOWN ERROR_ACCESS_DENIED Unknown authentication error occurred.
0x80070008 LDAP_NO_MEMORY ERROR_NOT_ENOUGH_MEMORY The system is out of memory.
0x8007001F LDAP_OTHER ERROR_GEN_FAILURE Unknown error occurred.
0x8007001F LDAP_LOCAL_ERROR ERROR_GEN_FAILURE Local error occurred.
0x80070037 LDAP_UNAVAILABLE ERROR_DEV_NOT_EXIST The server is not available.
0x8007003A LDAP_SERVER_DOWN ERROR_BAD_NET_RESP Cannot contact the LDAP server.
0x8007003B LDAP_ENCODING_ERROR ERROR_UNEXP_NET_ERR Encoding error occurred.
0x8007003B LDAP_DECODING_ERROR ERROR_UNEXP_NET_ERR Decoding error occurred.
0x80070044 LDAP_ADMIN_LIMIT_EXCEEDED ERROR_TOO_MANY_NAMES Administration limit on the server has exceeded.
0x80070056 LDAP_INVALID_CREDENTIALS ERROR_INVALID_PASSWORD The supplied credential is invalid.
0x80070057 LDAP_INVALID_DN_SYNTAX ERROR_INVALID_PARAMETER The distinguished name has an invalid syntax.
0x80070057 LDAP_NAMING_VIOLATION ERROR_INVALID_PARAMETER There was a naming violation.
0x80070057 LDAP_OBJECT_CLASS_VIOLATION ERROR_INVALID_PARAMETER There was an object class violation.
0x80070057 LDAP_FILTER_ERROR ERROR_INVALID_PARAMETER The search filter is bad.
0x80070057 LDAP_PARAM_ERROR ERROR_INVALID_PARAMETER A bad parameter was passed to a routine.
0X8007006E LDAP_OPERATIONS_ERROR ERROR_OPEN_FAILED Operations error occurred.
0x8007007A LDAP_RESULTS_TOO_LARGE ERROR_INSUFFICIENT_BUFFER Results returned are too large.
0x8007007B LDAP_INVALID_SYNTAX ERROR_INVALID_NAME The syntax is invalid.
0x8007007C LDAP_PROTOCOL_ERROR ERROR_INVALID_LEVEL Protocol error occurred.
0x800700B7 LDAP_ALREADY_EXISTS ERROR_ALREADY_EXISTS The object already exists.
0x800700EA LDAP_PARTIAL_RESULTS ERROR_MORE_DATA Partial results and referrals received.
0x800700EA LDAP_BUSY ERROR_BUSY The server is busy.
0x800703EB LDAP_UNWILLING_TO_PERFORM ERROR_CAN_NOT_COMPLETE The server is unwilling to perform.
0x8007041D LDAP_TIMEOUT ERROR_SERVICE_REQUEST_TIMEOUT The search was timed out.
0x800704B8 LDAP_COMPARE_FALSE ERROR_EXTENDED_ERROR Compare yielded FALSE.
0x800704B8 LDAP_COMPARE_TRUE ERROR_EXTENDED_ERROR Compare yielded TRUE.
0x800704B8 LDAP_REFERRAL ERROR_EXTENDED_ERROR Referral
0x800704B8 LDAP_UNAVAILABLE_CRIT_EXTENSION ERROR_EXTENDED_ERROR Critical extension is unavailable.
0x800704B8 LDAP_NO_SUCH_ATTRIBUTE ERROR_EXTENDED_ERROR Requested attribute does not exist.
0x800704B8 LDAP_UNDEFINED_TYPE ERROR_EXTENDED_ERROR Type is not defined.
0x800704B8 LDAP_INAPPROPRIATE_MATCHING ERROR_EXTENDED_ERROR There was an inappropriate matching.
0x800704B8 LDAP_CONSTRAINT_VIOLATION ERROR_EXTENDED_ERROR There was a constrain violation.
0x800704B8 LDAP_ATTRIBUTE_OR_VALUE_EXISTS ERROR_EXTENDED_ERROR The attribute exists or the value has been assigned.
0x800704B8 LDAP_ALIAS_PROBLEM ERROR_EXTENDED_ERROR The alias is invalid.
0x800704B8 LDAP_IS_LEAF ERROR_EXTENDED_ERROR The object is a leaf.
0x800704B8 LDAP_ALIAS_DEREF_PROBLEM ERROR_EXTENDED_ERROR Cannot dereference the alias.
0x800704B8 LDAP_LOOP_DETECT ERROR_EXTENDED_ERROR Loop was detected.
0x800704B8 LDAP_NOT_ALLOWED_ON_NONLEAF ERROR_EXTENDED_ERROR Operation is not allowed on a non leaf object.
0x800704B8 LDAP_NOT_ALLOWED_ON_RDN ERROR_EXTENDED_ERROR Operation is not allowed on RDN.
0x800704B8 LDAP_NO_OBJECT_CLASS_MODS ERROR_EXTENDED_ERROR Cannot modify object class.
0x800704B8 LDAP_AFFECTS_MULTIPLE_DSAS ERROR_EXTENDED_ERROR Multiple directory service agents are affected.
0x800704C7 LDAP_USER_CANCELLED ERROR_CANCELLED The user has cancelled the operation.
0x80070718 LDAP_TIMELIMIT_EXCEEDED ERROR_NOT_ENOUGH_QUOTA Time limit has exceeded
0x80070718 LDAP_SIZELIMIT_EXCEEDED ERROR_NOT_ENOUGH_QUOTA Size limit has exceeded

In ADSI 2.0, several LDAP error messages are mapped to a Win32 error code as ERROR_EXTENDED_ERROR. Call ADsGetLastError to retrieve the error string returned by the server. For more information, see ADSI Extended Error Messages below.