The trick is to ask them their name. If they reply "Smith", then you say "Yes I know it's Smith, but it seems I can't recall your first name", so he says "John". Or if he says his complete name straight away, you say "Yes I knew it was John, it was the Smith I couldn't remember"
Bingo, you have their complete name. Works the other way round too.
if germane i like to ask how their name is spelled in case i need to email them later. then i dont need to admit i forgot or until then never cared to know