title: How to map LDAP AD Groups to User roles in python flask AppBuilder
body: <p>I'm currently trying to map automatically user groups in LDAP to user roles in a flask AppBuilder framework based application but can't come up with a solution. I have read through the entire flask AppBuilder documentation and didn't find anything related to this.
  Here is the basic configuration I have come up with. I don't know how I could map different roles to different user groups.</p>
  <pre><code>AUTH_TYPE = AUTH_LDAP
  AUTH_LDAP_SERVER = &quot;ldap://ldapserver.local&quot;
  AUTH_LDAP_USE_TLS = False
  AUTH_LDAP_SEARCH = &quot;dc=domain,dc=local&quot;
  AUTH_LDAP_BIND_USER = &quot;CN=Query User,OU=People,dc=domain,dc=local&quot;
  AUTH_LDAP_BIND_PASSWORD = &quot;password&quot;
  AUTH_USER_REGISTRATION = True
  AUTH_USER_REGISTRATION_ROLE = &quot;Admin&quot;
  </code></pre>