# \[Solved\] User not registered in LDAP server

**URL:** <https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983>\
**Category:** Troubleshooting\
**Created:** [July 30, 2016, 4:51am UTC](https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983 "2016-07-30T04:51:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoonHean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/boonhean/32/845_2.png) [@BoonHean](https://forum.mattermost.com/u/BoonHean)\
**Post date:** [July 30, 2016, 4:51am UTC](https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983/1 "2016-07-30T04:51:25Z")

</div>

I’ve just setup ldap and all seems to be working.

This is my ldap configurations:

```
   "LdapSettings": {
        "Enable": true,
        "LdapServer": "spkmain01.spkanim.com",
        "LdapPort": 389,
        "ConnectionSecurity": "",
        "BaseDN": "dc=spkanim,dc=com",
        "BindUsername": "spkanim\\testusersg",
        "BindPassword": "password",
        "UserFilter": "(objectCategory=Person))",
        "FirstNameAttribute": "givenName",
        "LastNameAttribute": "sn",
        "EmailAttribute": "mail",
        "UsernameAttribute": "sAMAccountName",
        "NicknameAttribute": "nickname",
        "IdAttribute": "objectGUID",
        "SyncIntervalMinutes": 2,
        "SkipCertificateVerification": true,
        "QueryTimeout": 60,
        "MaxPageSize": 500,
        "LoginFieldName": ""
    },

```

It seems to synchronized successfully:

`[2016/07/30 12:38:24 SGT] [INFO] LDAP Synchronization completed`

However, when I tried to sign on with a AD user, I’ve got the these errors:

```
[2016/07/30 12:38:34 SGT] [EROR] /api/v3/users/login:findUser code=400 rid=nhnj6ji7uj8cddaeh7hwmodmfw uid= ip=10.0.17.5 User not registered on LDAP server [details: username=spkanim\savio]
[2016/07/30 12:38:38 SGT] [EROR] /api/v3/users/login:findUser code=400 rid=57w7xswijpd89crjenkzap6yqy uid= ip=10.0.17.5 User not registered on LDAP server [details: username=savio]

```

I’ve tried a few other users and the results are the same. Is there anyway to see how many users are synced to Mattermost from ldap? I’ve also gone through the troubleshooting section in the docs but none of that helps. Did I miss anything?

---

<div class="post-metadata">

**Author:** ![it33](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/it33/32/3_2.png) [@it33](https://forum.mattermost.com/u/it33)\
**Post date:** [July 30, 2016, 5:34am UTC](https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983/2 "2016-07-30T05:34:11Z")

</div>

Hi @BoonHean, could you try running your User Filter query in Active Directory to see what it returns?

Also, please see [troubleshooting documentation](https://docs.mattermost.com/deployment/sso-ldap.html#user-not-registered-on-ldap-server) on this error message.

---

<div class="post-metadata">

**Author:** ![BoonHean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/boonhean/32/845_2.png) [@BoonHean](https://forum.mattermost.com/u/BoonHean)\
**Post date:** [July 30, 2016, 5:43am UTC](https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983/3 "2016-07-30T05:43:57Z")

</div>

Hi @it33, thanks for your quick response. Yes, that’s the troubleshooting docs that I have looked. I have also tried running the query in my AD and its returns over 500 items. I was using a more complex filter but for debugging purposes I’ve reduce it to the one I submitted here. I’m quite sure the filter works because I’ve use it in other applications like Confluence and Zimbra.

Question, should the user login as domain\username or just username? As shown in the logs, I’ve tried either way and it didn’t work. Are the accounts created the first time a new user logs in or during the sync? If its during the sync, can I query the DB how many accounts Mattermost found? Sorry, I’m not familiar with postgres and the Mattermost schema so didn’t dig further.

Thanks!

---

<div class="post-metadata">

**Author:** ![it33](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/it33/32/3_2.png) [@it33](https://forum.mattermost.com/u/it33)\
**Post date:** [July 30, 2016, 10:04pm UTC](https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983/4 "2016-07-30T22:04:44Z")

</div>

Hi @BoonHean

It looks like you are mapping your [ID Attribute](https://docs.mattermost.com/administration/config-settings.html#id-attribute) to `objectGUID`, try mapping it to `sAMAccountName` to log in with username and password?

---

<div class="post-metadata">

**Author:** ![BoonHean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/boonhean/32/845_2.png) [@BoonHean](https://forum.mattermost.com/u/BoonHean)\
**Post date:** [August 1, 2016, 8:47am UTC](https://forum.mattermost.com/t/solved-user-not-registered-in-ldap-server/1983/5 "2016-08-01T08:47:47Z")

</div>

Yes! 🙂 That fixes the issue. Thanks!
