LDAP Search – Sort

The Sort field in LDAP Search option provides the ability to define the sort order of the results returned by the server, the sort is completed on the servers before the results are returned.  The sort field provides a number of options to define how the sort is completed.

The basic sort option is to specify the name of the field to be sorted, the field is sorted in alphabetically order, if you want a reverse the sorted order, prefix the attribute name with '-' i.e -displayname.

NetTools allows multiple sort field names to be specified, with each field name separated by a comma, however, AD only supports one field, if you specify more than one, the DC will return a critical control is not supported.

This feature is available in v1.30.7 beta and above

The sort field also supports the use of Ordering OID, which can be used to change the ordering of the sorted results returned by the server.  To specify an Ordering OID, you need to enter the attribute to sorted followed by the Ordering OID separated by a semi-colon. i.e. displayname;1.2.840.113556.1.4.1594

These are Ordering OID that can be used:

Ordering rule OID Sort order
1.2.840.113556.1.4.1461Afrikaans
1.2.840.113556.1.4.1462Albanian
1.2.840.113556.1.4.1463Arabic: Saudi Arabia
1.2.840.113556.1.4.1464Arabic: Iraq
1.2.840.113556.1.4.1465Arabic: Egypt
1.2.840.113556.1.4.1466Arabic: Libya
1.2.840.113556.1.4.1467Arabic: Algeria
1.2.840.113556.1.4.1468Arabic: Morocco
1.2.840.113556.1.4.1469Arabic: Tunisia
1.2.840.113556.1.4.1470Arabic: Oman
1.2.840.113556.1.4.1471Arabic: Yemen
1.2.840.113556.1.4.1472Arabic: Syria
1.2.840.113556.1.4.1473Arabic: Jordan
1.2.840.113556.1.4.1474Arabic: Lebanon
1.2.840.113556.1.4.1475Arabic: Kuwait
1.2.840.113556.1.4.1476Arabic: UAE
1.2.840.113556.1.4.1477Arabic: Bahrain
1.2.840.113556.1.4.1478Arabic: Qatar
1.2.840.113556.1.4.1479Armenian
1.2.840.113556.1.4.1480Assamese
1.2.840.113556.1.4.1481Azeri: Latin
1.2.840.113556.1.4.1482Azeri: Cyrillic
1.2.840.113556.1.4.1483Basque
1.2.840.113556.1.4.1484Belarussian
1.2.840.113556.1.4.1485Bengali
1.2.840.113556.1.4.1486Bulgarian
1.2.840.113556.1.4.1487Burmese
1.2.840.113556.1.4.1488Catalan
1.2.840.113556.1.4.1489Chinese: Taiwan
1.2.840.113556.1.4.1490Chinese: PRC
1.2.840.113556.1.4.1491Chinese: Hong Kong SAR
1.2.840.113556.1.4.1492Chinese: Singapore
1.2.840.113556.1.4.1493Chinese: Macau SAR
1.2.840.113556.1.4.1494Croatian
1.2.840.113556.1.4.1495Czech
1.2.840.113556.1.4.1496Danish
1.2.840.113556.1.4.1497Dutch
1.2.840.113556.1.4.1498Dutch:Belgium
1.2.840.113556.1.4.1499English: United States
1.2.840.113556.1.4.1500English: United Kingdom
1.2.840.113556.1.4.1665English: Australia
1.2.840.113556.1.4.1666English: Canada
1.2.840.113556.1.4.1667English: New Zealand
1.2.840.113556.1.4.1668English: Ireland
1.2.840.113556.1.4.1505English: South Africa
1.2.840.113556.1.4.1506English: Jamaica
1.2.840.113556.1.4.1507English: Caribbean
1.2.840.113556.1.4.1508English: Belize
1.2.840.113556.1.4.1509English:Trinidad
1.2.840.113556.1.4.1510English: Zimbabwe
1.2.840.113556.1.4.1511English: Philippines
1.2.840.113556.1.4.1512Estonian
1.2.840.113556.1.4.1513Faeroese
1.2.840.113556.1.4.1514Persian
1.2.840.113556.1.4.1515Finnish
1.2.840.113556.1.4.1516French: France
1.2.840.113556.1.4.1517French: Belgium
1.2.840.113556.1.4.1518French: Canada
1.2.840.113556.1.4.1519French: Switzerland
1.2.840.113556.1.4.1520French: Luxembourg
1.2.840.113556.1.4.1521French: Monaco
1.2.840.113556.1.4.1522Georgian
1.2.840.113556.1.4.1523German: Germany
1.2.840.113556.1.4.1524German: Switzerland
1.2.840.113556.1.4.1525German: Austria
1.2.840.113556.1.4.1526German: Luxembourg
1.2.840.113556.1.4.1527German: Liechtenstein
1.2.840.113556.1.4.1528Greek
1.2.840.113556.1.4.1529Gujarati
1.2.840.113556.1.4.1530Hebrew
1.2.840.113556.1.4.1531Hindi
1.2.840.113556.1.4.1532Hungarian
1.2.840.113556.1.4.1533Icelandic
1.2.840.113556.1.4.1534Indonesian
1.2.840.113556.1.4.1535Inukitut
1.2.840.113556.1.4.1536Italian:Italy
1.2.840.113556.1.4.1537Italian:Switzerland
1.2.840.113556.1.4.1538Japanese
1.2.840.113556.1.4.1539Kannada
1.2.840.113556.1.4.1540Kashmiri Arabic
1.2.840.113556.1.4.1541Kashmiri
1.2.840.113556.1.4.1542Kazakh
1.2.840.113556.1.4.1543Khmer
1.2.840.113556.1.4.1544Kirghiz
1.2.840.113556.1.4.1545Konkani
1.2.840.113556.1.4.1546Korean
1.2.840.113556.1.4.1547Korean:Johab
1.2.840.113556.1.4.1548Latvian
1.2.840.113556.1.4.1549Lithuanian
1.2.840.113556.1.4.1550North Macedonian
1.2.840.113556.1.4.1551Malaysian
1.2.840.113556.1.4.1552Malay Brunei Darussalam
1.2.840.113556.1.4.1553Malayalam
1.2.840.113556.1.4.1554Maltese
1.2.840.113556.1.4.1555Manipuri
1.2.840.113556.1.4.1556Marathi
1.2.840.113556.1.4.1557Nepali:Nepal
1.2.840.113556.1.4.1558Norwegian:Bokmal
1.2.840.113556.1.4.1559Norwegian:Nynorsk
1.2.840.113556.1.4.1560Odia
1.2.840.113556.1.4.1561Polish
1.2.840.113556.1.4.1562Portuguese:Brazil
1.2.840.113556.1.4.1563Portuguese:Portugal
1.2.840.113556.1.4.1564Punjabi
1.2.840.113556.1.4.1565Romanian
1.2.840.113556.1.4.1566Russian
1.2.840.113556.1.4.1567Sanskrit
1.2.840.113556.1.4.1568Serbian:Cyrillic
1.2.840.113556.1.4.1569Serbian:Latin
1.2.840.113556.1.4.1570Sindhi:India
1.2.840.113556.1.4.1571Slovak
1.2.840.113556.1.4.1572Slovenian
1.2.840.113556.1.4.1573Spanish: SpainTraditional Sort
1.2.840.113556.1.4.1574Spanish: Mexico
1.2.840.113556.1.4.1575Spanish: SpainModern Sort
1.2.840.113556.1.4.1576Spanish: Guatemala
1.2.840.113556.1.4.1577Spanish: Costa Rica
1.2.840.113556.1.4.1578Spanish: Panama
1.2.840.113556.1.4.1579Spanish: Dominican Republic
1.2.840.113556.1.4.1580Spanish: Venezuela
1.2.840.113556.1.4.1581Spanish: Colombia
1.2.840.113556.1.4.1582Spanish: Peru
1.2.840.113556.1.4.1583Spanish: Argentina
1.2.840.113556.1.4.1584Spanish: Ecuador
1.2.840.113556.1.4.1585Spanish: Chile
1.2.840.113556.1.4.1586Spanish: Uruguay
1.2.840.113556.1.4.1587Spanish: Paraguay
1.2.840.113556.1.4.1588Spanish: Bolivia
1.2.840.113556.1.4.1589Spanish: El Salvador
1.2.840.113556.1.4.1590Spanish: Honduras
1.2.840.113556.1.4.1591Spanish: Nicaragua
1.2.840.113556.1.4.1592Spanish: Puerto Rico
1.2.840.113556.1.4.1593Swahili: Kenya
1.2.840.113556.1.4.1594Swedish
1.2.840.113556.1.4.1595Swedish: Finland
1.2.840.113556.1.4.1596Tamil
1.2.840.113556.1.4.1597Tatar: Tatarstan
1.2.840.113556.1.4.1598Telugu
1.2.840.113556.1.4.1599Thai
1.2.840.113556.1.4.1600Turkish
1.2.840.113556.1.4.1601Ukrainian
1.2.840.113556.1.4.1602Urdu: Pakistan
1.2.840.113556.1.4.1603Urdu: India
1.2.840.113556.1.4.1604Uzbek: Latin
1.2.840.113556.1.4.1605Uzbek: Cyrillic
1.2.840.113556.1.4.1606Vietnamese
1.2.840.113556.1.4.1607Japanese: XJIS
1.2.840.113556.1.4.1608Japanese:?Unicode
1.2.840.113556.1.4.1609Chinese: Big5
1.2.840.113556.1.4.1610Chinese: PRCP
1.2.840.113556.1.4.1611Chinese:?Unicode
1.2.840.113556.1.4.1612Chinese: PRC
1.2.840.113556.1.4.1613Chinese: BOPOMOFO
1.2.840.113556.1.4.1614Korean: KSC
1.2.840.113556.1.4.1615Korean:?Unicode
1.2.840.113556.1.4.1616German Phone Book
1.2.840.113556.1.4.1617Hungarian: Default
1.2.840.113556.1.4.1618Hungarian: Technical
1.2.840.113556.1.4.1619Georgian: Traditional
1.2.840.113556.1.4.1620Georgian: Modern

If you want to enable additional Ordering OID, the corresponding Language ID must be enabled for AD or LDS. If you specify a Ordering OID that is not supported the server will return an Error: (0x5D) did not find the specified control.  See this article for details on how to enable additional languages support.