Method to get attributes from LDAP