title: How to get the nested groups in LDAP/AD?
body: <p>We have an LDAP login problem of a specific user and I'm suspecting that this is due to cyclic groups assignment in LDAP, i.e. the user is assigned to groups A,B,C,D. Group A contains sub-groups E,F,G and group E contains group A again.</p>
  
  <p>If I query for the user I can see that he has been assigned with 50+ groups and each group may contain more groups and each of those may contain more....</p>
  
  <p>My question is if there's a query I can run to get the nested groups inside those main groups all the way down instead of going each group and do it manually?</p>
  
  <p>The server is AD</p>
  
  <p><img src="https://i.stack.imgur.com/lPHHQ.jpg" alt="enter image description here"></p>