# LDAP configuration

**URL:** <https://community.grafana.com/t/ldap-configuration/11714>\
**Category:** Configuration\
**Created:** [November 1, 2018, 9:44pm UTC](https://community.grafana.com/t/ldap-configuration/11714 "2018-11-01T21:44:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![agnesyangwei](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@agnesyangwei](https://community.grafana.com/u/agnesyangwei)\
**Post date:** [November 1, 2018, 9:44pm UTC](https://community.grafana.com/t/ldap-configuration/11714/1 "2018-11-01T21:44:15Z")

</div>

Hello,

Would you please share your success configuration for LDAP?

My config:  
grafana.ini  
[auth.ldap]  
enabled = true  
config\_file = /etc/grafana/ldap.toml

[log]  
mode = console file  
level = debug  
filters = ldap:debug

ldap.toml  
[[servers]]  
host = “[example.com](http://example.com)”  
port = 636  
use\_ssl = true  
start\_tls = false  
ssl\_skip\_verify = true  
bind\_dn = “CN=,OU=Users,OU=Branch,DC=example,DC=com”  
bind\_password = ‘’  
search\_filter = “(sAMAccountName=%s)”  
search\_base\_dns = [“OU=Users,OU=Branch,DC=example,DC=com”]

[servers.attributes]  
name = “givenName”  
surname = “sn”  
username = “sAMAccountName”  
member\_of = “memberOf”  
email = “mail”

[[servers.group\_mappings]]  
group\_dn = “CN=Engineering,OU=Users,OU=Branch,DC=example,DC=com”  
org\_role = “Admin”  
grafana\_admin = true # Available in Grafana v5.3 and above

[[servers.group\_mappings]]  
group\_dn = “\*”  
org\_role = “Viewer”

Failed on LDAP auth with the error message  
“Initial bind failed” logger=ldap error=“LDAP Result Code 49 “Invalid Credentials”: 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580”

Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![agnesyangwei](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@agnesyangwei](https://community.grafana.com/u/agnesyangwei)\
**Post date:** [November 2, 2018, 5:23pm UTC](https://community.grafana.com/t/ldap-configuration/11714/2 "2018-11-02T17:23:26Z")

</div>

Found a very helpful post [https://github.com/grafana/grafana/issues/10040](https://github.com/grafana/grafana/issues/10040)  
The config works on our env.
