"Can I know your name, please?"
That's possible, though have is more likely than know, in my opinion.
If it's a visitor to your house, for example, someone who has come with a friend of yours, you might say:
I'm sorry, I don't know you name. or:
Good evening/hello/hi; I'm Marie.
This is a clue for the other persn to give you their name.