def get_ldap_users(conn, searchfilter, attrs):
    """
    Search users in catalog using searchfilter and return it with given attributes.
    :param conn: ldap3.Connection object.
    :param searchfilter: LDAP search filter from config file.
    :param attrs: List of attributes to get from catalog.
    :return: dict with all found objects.
    """

    base_dn = conn.server.info.other['DefaultNamingContext'][0]
    conn.search(search_base=base_dn, search_filter=searchfilter, attributes=attrs)
    return conn.entries