A man asked, "Messenger of Allah, who is my father?"He replied, "Your father is so-and-so."Then this verse was revealed, "You who believe, do not ask about things which, if shown to you, would distress you" [Maidah 5:101].
حدثنا محمد بن معمر أبو عبد الله البصري حدثنا روح بن عبادة حدثنا شعبة أخبرني موسى بن أنس قال سمعت
قال رجل يا رسول الله من أبي قال أبوك فلان فنزلت {يا أيها الذين آمنوا لا تسألوا عن أشياء إن تبد لكم تسؤكم}
Agreed upon [by Bukhari and Muslim]. Muslim also narrated it in the Book of Virtues, Chapter on Showing Him Reverence ﷺ and Refraining from Excessive Questioning About What Is Not Necessary... etc., hadith 2359, from Muhammad bin Muamar, and Bukhari, hadith 7295, from the hadith of Rawh, through the same chain.