# Simple LDAP authentication with role mapping issues

**URL:** <https://forums.percona.com/t/simple-ldap-authentication-with-role-mapping-issues/39605>\
**Category:** Percona Server for MySQL\
**Tags:** mysql, ldap\
**Created:** [October 23, 2025, 8:29pm UTC](https://forums.percona.com/t/simple-ldap-authentication-with-role-mapping-issues/39605 "2025-10-23T20:29:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jimmy\_Chen](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jimmy_chen/32/15189_2.png) [@Jimmy\_Chen](https://forums.percona.com/u/Jimmy_Chen)\
**Post date:** [October 23, 2025, 8:29pm UTC](https://forums.percona.com/t/simple-ldap-authentication-with-role-mapping-issues/39605/1 "2025-10-23T20:29:21Z")

</div>

I’m testing LDAP(s) auth with Percona Server 8.4.6. The following is the configuration I have. I’m able to log in with the LDAP user. If I explicitly grant the user with permissions, then everything is working expected. However, I can’t get the role mapping to work where if a user logs in, the specific LDAP group maps to `admin` role. I started with creating the `admin` role with permissions. Then I created a user with is identified with `authentication_ldap_simple` plugin. The user belongs to a group called `test-mysql-admins` in LDAP. The following is my MySQL configuration. No matter what I do, when I try to log in, I do not get any permissions at all.

```auto
[mysqld]
plugin-load-add=authentication_ldap_simple.so
authentication_ldap_simple_server_host=dc.example.com
authentication_ldap_simple_server_port=636
authentication_ldap_simple_ssl=ON
authentication_ldap_simple_bind_base_dn=DC=example,DC=com
authentication_ldap_simple_user_search_attr=sAMAccountName
authentication_ldap_simple_bind_root_dn=CN=LDAP User,OU=Misc Users,DC=example,DC=com
authentication_ldap_simple_bind_root_pwd=somepassword
authentication_ldap_simple_log_status=6
authentication_ldap_simple_group_role_mapping=test-mysql-admins=admin

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 28, 2025, 11:57pm UTC](https://forums.percona.com/t/simple-ldap-authentication-with-role-mapping-issues/39605/2 "2025-10-28T23:57:54Z")

</div>

Hi @Jimmy_Chen,  
Please provide how you created the users/roles in MySQL. Then also, please provide any logs. I see you have max log enabled, so there should be something for diagnosis.

---

<div class="post-metadata">

**Author:** ![jaimes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jaimes/32/20419_2.png) [@jaimes](https://forums.percona.com/u/jaimes)\
**Post date:** [December 18, 2025, 9:07am UTC](https://forums.percona.com/t/simple-ldap-authentication-with-role-mapping-issues/39605/3 "2025-12-18T09:07:51Z")

</div>

The role needs to be activated. Please also share the outputs of:

```auto
SHOW GRANTS;
SET ROLE admin;
SHOW GRANTS;

```

If this doesn’t work, please share the LDAP record for the user and the group.

Thanks.
