How does に fit in here?


> 先生にこんなお孫さんがいたんですか‌

Could someone explain to me how it fits in here and why it works?

I'm still confused about why they use the ''に'' instead of ''は'' here like
this:

> 先生はこんなお孫さんがいたんですか‌

