title: How to setup TeamCity with LDAP group membership synchronization
body: <p>This is a short howto to get you going with your LDAP setup for TeamCity.
  I personally struggled for quite a bit, before I managed to get the synchronisation to run. The default config files has a lot of settings and text, which may be more confusing than helpful. A lot of posts about issues setting up group sync can be seen at both JetBrains and StackOverflow.</p>
  
  <p>This setup assumes you don't have a nested group for importing members, but single groups.
  If you want to use a nested group for TeamCity, then look at the "Limiting the number of groups to by synchronized" section at <a href="https://www.jetbrains.com/help/teamcity/typical-ldap-configurations.html?_ga=2.213872598.374019039.1565610915-964155662.1565610915" rel="nofollow noreferrer">https://www.jetbrains.com/help/teamcity/typical-ldap-configurations.html?_ga=2.213872598.374019039.1565610915-964155662.1565610915</a></p>
  
  <p>Change the teamcity.users.filter accordingly.</p>
  
  <pre><code>teamcity.users.filter=(&amp;(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=TeamCity Users,OU=Accounts,DC=domain,DC=com))
  </code></pre>
  
  <p>JetBrains prefers that you have a nested group where the top node is your TeamCity group. However that's not how I wanted to setup the sync at the moment. </p>
  
  <p><strong>Assumptions</strong></p>
  
  <ul>
  <li><p>You have read the guide <a href="https://www.jetbrains.com/help/teamcity/ldap-integration.html" rel="nofollow noreferrer">https://www.jetbrains.com/help/teamcity/ldap-integration.html</a></p></li>
  <li><p>You have an Active Directory user (or better: ServiceAccount) which can connect to LDAP with username / password</p></li>
  <li><p>You can login with LDAP, but you have no clue on how to get the group membership sync to work.</p></li>
  </ul>