Updated to handle both ad|1234 and ad|LDAP|1234