mod_vcard_ldap поиск

Доброго времени суток. Пытаюсь настроить поиск по vcard. vcard заполняется из ldap (active directory), но вот поиск не работает. Подскажите пожалуйста в чем может быть проблема.
Мой конфиг:
{hosts, ["ubuntuserver"]}.

{loglevel, 4}.

{listen,
[
{5222, ejabberd_c2s, [
{certfile, "/opt/ejabberd/conf/server.pem"}, starttls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
]},
{5223, ejabberd_c2s, [
{certfile, "/opt/ejabberd/conf/server.pem"}, tls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
]},
{5269, ejabberd_s2s_in, [
{shaper, s2s_shaper},
{max_stanza_size, 131072}
]},
{5280, ejabberd_http, [
captcha,
http_bind,
http_poll,
web_admin
]},

{{3478, udp}, ejabberd_stun, []},
{3478, ejabberd_stun, []},
{5349, ejabberd_stun, [{certfile, "/opt/ejabberd/conf/server.pem"}]}
]}.

{s2s_use_starttls, true}.
{s2s_certfile, "/opt/ejabberd/conf/server.pem"}.

{auth_method, ldap}.
{ldap_servers, ["pdc"]}.
{ldap_uids, [{"userPrincipalName", "%u@********"}]}.
{ldap_base, "dc=***,dc=***"}.
{ldap_rootdn, "******"}.
{ldap_password, "*******"}.

{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.

{acl, admin, {user, "admin", "ubuntuserver"}}.
{acl, local, {user_regexp, ""}}.

{access, max_user_sessions, [{10, all}]}.
{access, local, [{allow, local}]}.
{access, c2s, [{deny, blocked},
{allow, all}]}.
{access, c2s_shaper, [{none, admin},
{normal, all}]}.
{access, s2s_shaper, [{fast, all}]}.
{access, announce, [{allow, admin}]}.
{access, configure, [{allow, admin}]}.
{access, muc_admin, [{allow, admin}]}.
{access, muc, [{allow, all}]}.
{access, muc_create, [{allow, local}]}.
{access, register, [{allow, all}]}.
{access, pubsub_createnode, [{allow, local}]}.

{language, "ru"}.

{modules,
[
{mod_adhoc, []},
{mod_announce, [{access, announce}]}, % requires mod_adhoc
{mod_caps, []},
{mod_configure,[]}, % requires mod_adhoc
{mod_disco, []},
{mod_http_bind,[]},
{mod_last, []},
{mod_muc, [
{host, "conference.@HOST@"},
{access, muc},
{access_create, muc_create},
{access_persistent, muc_create},
{access_admin, muc_admin}
]},
{mod_offline, []},
{mod_privacy, []},
{mod_private, []},
{mod_pubsub, [ % requires mod_caps
{access_createnode, pubsub_createnode},
{ignore_pep_from_offline, true},
{last_item_cache, false},
{plugins, ["flat", "hometree", "pep"]}
]},
{mod_roster, []},
{mod_shared_roster,[]},
{mod_time, []},
{mod_version, []},

{mod_shared_roster_ldap,
[
{ldap_groupattr,"extensionAttribute3"},
{ldap_groupdesc,"extensionAttribute2"},
{ldap_rfilter, "(&(objectCategory=user))"},
{ldap_memberattr,"sAMAccountName"},
{ldap_userdesc,"cn"}
]
},

{mod_vcard_ldap,[
{search, true},
{allow_return_all, true},
{matches, infinity},
{ldap_vcard_map,[
{"NICKNAME", "%u", []},
{"GIVEN", "%s", ["givenName"]},
{"MIDDLE", "%s", ["initials"]},
{"FAMILY", "%s", ["sn"]},
{"FN", "%s", ["displayName"]},
{"EMAIL", "%s", ["mail"]},
{"ORGNAME", "%s", ["company"]},
{"ORGUNIT", "%s", ["department"]},
{"CTRY", "%s", ["c"]},
{"LOCALITY", "%s", ["l"]},
{"STREET", "%s", ["streetAddress"]},
{"REGION", "%s", ["st"]},
{"PCODE", "%s", ["postalCode"]},
{"TITLE", "%s", ["title"]},
{"URL", "%s", ["wWWHomePage"]},
{"DESC", "%s", ["description"]},
{"TEL", "%s", ["telephoneNumber"]}
]},
{ldap_search_fields,[
{"User", "%u"},
{"Name", "givenName"},
{"Family Name", "sn"},
{"Email", "mail"}
]},
{ldap_search_reported,[
{"Full Name", "DisplayName"},
{"Nickname", "sAMAccountName"},
{"Email", "mail"}
]}
]},
{mod_version, []}
]}.

РЕШЕНО

Проблему решил.
в конфиге вместо

{ldap_uids, [{"userPrincipalName", "%u@********"}]}.

нужно было написать

{ldap_uids, [{"sAMAccountName", "%u"}]}.
Syndicate content