ERROR_DS_INVALID_SEARCH_FLAG - 8500 (0x2134)
The search flags for the attribute are invalid. The ANR bit is valid only on attributes of Unicode or Teletex strings.
Updated: Feb 21, 2026
Technical Meaning
The ERROR_DS_INVALID_SEARCH_FLAG error code indicates that the search flags used for an attribute are invalid. This error is specific to operations involving directory service attributes, particularly in scenarios where attribute validation and search criteria are applied.
Error Details
This error occurs when the ANR (Attribute Normalization Required) bit is set on an attribute that does not support this flag. The ANR bit is valid only for attributes of Unicode or Teletex string types. Attempting to use it with other data types will result in this error.
Usage Context
This error typically arises during operations involving directory service searches, such as LDAP queries or Active Directory attribute manipulations. It indicates a mismatch between the expected and actual attribute type when search flags are applied.
Developer Interpretation
Developers should ensure that the correct search flags are used for attributes of specific types. For instance, setting the ANR bit on an attribute that is not of Unicode or Teletex string type will trigger this error. Developers must validate input parameters and attribute types to avoid such errors in their applications.
Related Errors
ERROR_DS_ATTRIBUTE_TYPE_MISMATCHERROR_DS_NO_ATTRIBUTE_OR_VALUE
FAQ
Q: What does the ANR bit mean?
A: The ANR (Attribute Normalization Required) bit is a flag that indicates whether attribute normalization is required for certain operations. It is valid only on attributes of Unicode or Teletex string types.
Q: How can I avoid this error?
A: Ensure that the search flags used match the type of the attribute being searched. Validate input parameters and attribute types to prevent mismatches.
Summary
The ERROR_DS_INVALID_SEARCH_FLAG is a specific error indicating an invalid use of search flags in directory service operations. Developers should carefully validate their input parameters and ensure compatibility with attribute types to avoid this error.