Sahih Muslim 1646 d
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أَلاَ إِنَّ اللَّهَ عَزَّ وَجَلَّ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ فَمَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ أَوْ لِيَصْمُتْ "
Abdullah (b. Umar) reported that Allah's Messenger (ﷺ) found, Umar b. al-Khattab amongst the riders and he was taking oath by his father Allah's Messenger (ﷺ) called them (saying) ; Our Allah, the Exated and Majestic, has forbidden you that you take oath by your father. He who bag to take an oath, he must take it by Allah or keep quiet.
Full reference and source
Sahih Muslim 1646 d In-book : Book 27, Hadith 4 USC-MSA web (English) : Book 15, Hadith 4038 (deprecated)
View source on Sunnah.com (opens in a new tab)