diff --git a/src/directoryserver.js b/src/directoryserver.js index 960a10a38..613a19df8 100644 --- a/src/directoryserver.js +++ b/src/directoryserver.js @@ -200,7 +200,7 @@ async function userSearch(req, res, next) { givenName: firstName, username: user.username, samaccountname: user.username, // to support ActiveDirectory clients - memberof: allGroups.filter(function (g) { return g.userIds.indexOf(user.id) !== -1; }).map(function (g) { return g.name; }) + memberof: allGroups.filter(function (g) { return g.userIds.indexOf(user.id) !== -1; }).map(function (g) { return `cn=${g.name},ou=groups,dc=cloudron`; }) } }; diff --git a/src/ldap.js b/src/ldap.js index 2aee44f9c..279141b2d 100644 --- a/src/ldap.js +++ b/src/ldap.js @@ -178,7 +178,7 @@ async function userSearch(req, res, next) { givenName: firstName, username: user.username, samaccountname: user.username, // to support ActiveDirectory clients - memberof: allGroups.filter(function (g) { return g.userIds.indexOf(user.id) !== -1; }).map(function (g) { return g.name; }) + memberof: allGroups.filter(function (g) { return g.userIds.indexOf(user.id) !== -1; }).map(function (g) { return `cn=${g.name},ou=groups,dc=cloudron`; }) } };