You're getting the display name and using it todo a search my userId. Either there is a bug in the UserProxy or this code is wrong.