jspωiki
LDAP Query using a bitwise filter

As far as we know, Microsoft is the only LDAP server Vendor implementing these matching filters.

http://support.microsoft.com/kb/269181

The format of the LDAP Matching Rule has the following syntax:

attributename:ruleOID:=value

where attributename is the LDAPDisplayName of the attribute, ruleOID is the object ID (OID) for the matching rule control, and value is the decimal value you want to use for comparison. You need to convert from hexadecimal to decimal.

The value of ruleOID can be one of the following:

  • 1.2.840.113556.1.4.803 - This is the LDAP_MATCHING_RULE_BIT_AND rule. The matching rule is true only if all bits from the property match the value. This rule is like the bitwise AND operator.
  • 1.2.840.113556.1.4.804 - This is the LDAP_MATCHING_RULE_BIT_OR rule. The matching rule is true if any bits from the property match the value. This rule is like the bitwise OR operator.