MS-DLX (Microsoft Lync) and contact search

  • Jaroslaw (Jarek) Polok

    Hello all.

    I see that git tree contains set of commits for upcoming 1.13.0 release: among these theere is MS-DLX ( support for searching contact on a Lync server.

    However these use the 'ChangeSearchRequest' method which seems ( to search on exact matches for given user attribute(s).

    I can confirm such behaviour against our Lync server installation - and in addition for such searches only a single match is returned.

    Wouldn't it be  more useful to use 'BasicSearch' method which allows for a wildcard matching (well, limited - using filter as 'beginswith' only). ?

    I have a rather 'proof of concept' patch against current git tree ( which allowed me to test the 'BasicSeach' method with success (it is really a proof of concept as it 'butchers' the search dialog quite a lot making it not useable for SIPE without MS-DLX ..) .. if anyone would be interested …



  • Stefan Becker

    Stefan Becker - 2012-03-06

    I agree, DLX is a joke compared to the old AD based directory search.

    But BasicSearchQuery is IMHO even worse than ChangeSearchRequest, because you can only have one search value which is compared against multiple fields, either exact or begins-with. This doesn't match up with the UI and user expectation at all.

  • Jaroslaw (Jarek) Polok

    Yep, I'm not too impressed either …

    Indeed, only one value can be searched, but the UI (for MS-DLX searches only) could be changed to have a single search input field and a dropdown list of  field names. 

    Current UI is better, but not really useable I fear: at least not in our environment (I'm not sure this concerns all Lync Server setups or only some ?) it is not really possible to find somebody using it - one needs to type in exact match for user firstname/name/etc.. and then MS-DLX returns only single result - and since we are an international organization sometimes it gets tricky to remember correct spelling ….

    Thanks && Cheers


  • Stefan Becker

    Stefan Becker - 2012-03-07

    The exact match per field is hard-coded into DLX ChangeSearchQuery, but I think it is at least case insensitive. Plus the results are OR'd not AND'd, i.e. if I search for first name "Foo" and last name "Bar" I get all Foo's and Bar's in the whole directory and not the expected "Foo Bar".

    IMHO the requirements to switch to BasicSearchQuery would be:
        - reliably detect that AD based search is disabled and DLX works, i.e. the plugin can set an internal flag
        - if the flag is set then instead of creating the original UI we create an alternative UI with only one entry field and a description text along the lines of "Enter a string that matches the start of the first name, last name, … you are looking for"
        - if the flag is set use BasicSearchQuery on all fields with begins-with match type

  • chathura

    chathura - 2012-10-31

    I have same problem with contact search and I did change on search method to basic search (on sipe 1.13.3)  as follows

    on sipe-buddy.c change DLX_SEARCH_ITEM to basic search as follows (line 436)

    #define SIPE_SOAP_SEARCH_ROW "<m:row m:attrib=\"%s\" m:value=\"%s\"/>"
    #define DLX_SEARCH_ITEM \
    "<BasicSearch>" \
    " <SearchList>%s,displayName,msRTCSIP-PrimaryUserAddress,title,telephoneNumber,homePhone,mobile,otherTelephone,mail,company,country</SearchList>" \
    " <Value>%s</Value>" \
    "<Verb>BeginsWith</Verb>" \

    sipe-svc.c change sipe_svc_ab_entry_reques function as follow

    gboolean sipe_svc_ab_entry_request(struct sipe_core_private *sipe_private,
       struct sipe_svc_session *session,
       const gchar *uri,
       const gchar *wsse_security,
       const gchar *search,
       guint entries,
       guint max_returns,
       sipe_svc_callback *callback,
       gpointer callback_data)
    gboolean ret;
    gchar *soap_body = g_strdup_printf("<SearchAbEntry"
       " xmlns=\"DistributionListExpander\">"
       " <AbEntryRequest>"
       "   %s"
       "  <Metadata>"
       "   <FromDialPad>false</FromDialPad>"
       "   <MaxResultNum>%d</MaxResultNum>"
       "   <ReturnList>givenName,displayName,msRTCSIP-PrimaryUserAddress,title,telephoneNumber,homePhone,mobile,otherTelephone,mail,company,country</ReturnList>"
       "  </Metadata>"
       " </AbEntryRequest>"
    entries ++;
    ret = new_soap_req(sipe_private,


    then return all search results

    This work for me…!

    • rajesh

      rajesh - 2014-11-18


      I have a problem while adding a buddy in pidgin. pidgin is connected to Lync server . as of now it recognizes only the email address while adding the buddies. I want to add the buddies with their Alias. could you please tell me how it can be made possible. what change i need to make to acheive this. ? pls help me.

  • Stefan Becker

    Stefan Becker - 2012-11-02

    So? You didn't solve any of the problems I listed for BasicSearch. You will only be able to search one item (probably the last you enter) and it will still only match from the beginning of the field.

  • chathura

    chathura - 2012-11-29

    After changing to basic search it display all the result under matching keyword

  • Stefan Becker

    Stefan Becker - 2014-12-13

    Several improvements to search, including an automatic fallback to BasicSearch for [MS-DLX], are now available on git HEAD

  • Alex G

    Alex G - 2014-12-15

    I just tested this code and I see one issue with it. If I search for Bob and there are multiple Bobs in the company I only get the first Bob. If I search for Bo then I get all the Bobs.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks