diff --git a/services/graph/pkg/identity/ldap.go b/services/graph/pkg/identity/ldap.go index d07aa6de445..a0458dafde0 100644 --- a/services/graph/pkg/identity/ldap.go +++ b/services/graph/pkg/identity/ldap.go @@ -1307,7 +1307,7 @@ func (i *LDAP) CreateLDAPGroupByDN(dn string) error { ar := ldap.NewAddRequest(dn, nil) attrs := map[string][]string{ - "objectClass": {"groupOfNames", "top"}, + "objectClass": {i.groupObjectClass, "top"}, "member": {""}, } diff --git a/services/graph/pkg/identity/ldap_group.go b/services/graph/pkg/identity/ldap_group.go index e2ebacf1269..e200875c6b2 100644 --- a/services/graph/pkg/identity/ldap_group.go +++ b/services/graph/pkg/identity/ldap_group.go @@ -184,9 +184,9 @@ func (i *LDAP) GetGroupMembers(ctx context.Context, groupID string, req *godata. } // CreateGroup implements the Backend Interface for the LDAP Backend -// It is currently restricted to managing groups based on the "groupOfNames" ObjectClass. -// As "groupOfNames" requires a "member" Attribute to be present. Empty Groups (groups -// without a member) a represented by adding an empty DN as the single member. +// The implementation uses the configured groupObjectClass. Many common classes like +// "groupOfNames" and "groupOfUniqueNames" require a "member" attribute to be present. +// Empty Groups (groups without a member) are represented by adding an empty DN as the single member. func (i *LDAP) CreateGroup(ctx context.Context, group libregraph.Group) (*libregraph.Group, error) { logger := i.logger.SubloggerWithRequestID(ctx) logger.Debug().Str("backend", "ldap").Msg("create group")