# LDAP badge?

**URL:** https://meta.discourse.org/t/ldap-badge/382116
**Category:** SSO
**Tags:** badges, sso
**Created:** [September 9, 2025, 9:09pm UTC](https://meta.discourse.org/t/ldap-badge/382116 "2025-09-09T21:09:57Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 12, 2025, 11:40am UTC](https://meta.discourse.org/t/ldap-badge/382116/4 "2025-09-12T11:40:15Z")

</div>

Oh. Sorry. I thought I’d would’ve d be as simple as adding the groups to some ldap field, but it looks like you’ll need a plugin.

> [@What is this code add\_to\_serializer in all these plugins](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913/19):
>
> I’m working on a plugin to automate discourse group syncing with ldap. I added a custom field to Group (ldap\_dn) to save the ldap group name in. I’m trying to retrieve the custom\_field value from an input field that i added in the membership plugin-outlet and save that to the db to later use it. To do so i added this to my plugin.rb file Group.register\_custom\_field\_type(‘ldap\_dn’, :text) Group.preload\_custom\_fields\<\< “ldap\_dn” if Group.respond\_to? :preloaded\_custom\_fields if SiteSetting.…

If you’re self hosted you can make one or ask in #Marketplace.

Your ldap users some all have the same email hostname, do they? If so, you can assign the group using that.

---

_[View the full topic](https://meta.discourse.org/t/ldap-badge/382116)._
