See a possible solution for this issue in this other SO question.
You will need to use the extensibility of UserPrincipal
to create a descendant class, in order to get access to the anr
property (anr = ambiguous name resolution) which allows searches in multiple name-related properties at once.