(ldap_client, base_dn, group_dn)
return output_array
Queries the membership of an Active Directory group. For large groups Active Directory will
       Not return the full membership by default but will instead return partial results. Additional
       processing is needed to get the full membership.
Queries the membership of an Active Directory group. For large groups Active Directory will
       Not return the full membership by default but will instead return partial results. Additional
       processing is needed to get the full membership.
Queries the membership of an Active Directory group . For large groups Active Directory will Not return the full membership by default but will instead return partial results . Additional processing is needed to get the full membership .
def get_membership_with_ranges(ldap_client, base_dn, group_dn):
    """Queries the membership of an Active Directory group. For large groups Active Directory will
       Not return the full membership by default but will instead return partial results. Additional
       processing is needed to get the full membership."""
    output_array = []

    # RFC 4515 sanitation.
    sanatized_group_dn = str(group_dn).replace('(', '\\28').replace(')', '\\29').replace('*', '\\2a').replace('\\', '\\5c')

    membership_filter = '(&(|(objectcategory=user)(objectcategory=group)(objectcategory=computer))(memberof={0}))'.format(sanatized_group_dn)
    membership_results = query_ldap_with_paging(ldap_client, base_dn, membership_filter, ['distinguishedName'])

    for element in membership_results:
        output_array.append(element['distinguishedName'][0])

    return output_array
def get_membership_with_ranges ( ldap_client , base_dn , group_dn ) : output_array = [ ] # RFC 4515 sanitation. sanatized_group_dn = str ( group_dn ) . replace ( '(' , '\\28' ) . replace ( ')' , '\\29' ) . replace ( '*' , '\\2a' ) . replace ( '\\' , '\\5c' ) membership_filter = '(&(|(objectcategory=user)(objectcategory=group)(objectcategory=computer))(memberof={0}))' . format ( sanatized_group_dn ) membership_results = query_ldap_with_paging ( ldap_client , base_dn , membership_filter , [ 'distinguishedName' ] ) for element in membership_results : output_array . append ( element [ 'distinguishedName' ] [ 0 ] ) return output_array