# LDAP Groups are not auto-populating Portainer teams

**Issue:**

Users find that LDAP authentication succeeds and **Display User/Group matching** correctly shows group membership, but the user is not automatically added to the corresponding Portainer team on login.

**Cause:**

Portainer team synchronization requires distinguished name (DN)-based group membership.

* `posixGroup` + `memberUid` → Group detection works, but Team sync does not assign users
* `groupOfNames` + `member` → Fully supported for Team auto-assignment

**Resolution:**

To resolve this issue, update the LDAP group configuration to use DN-based membership.

```
objectClass: groupOfNames
member: <full user DN>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.portainer.io/faqs/troubleshooting/access-and-authentication/ldap-groups-are-not-auto-populating-portainer-teams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
