Abdullah bin Umar reported,

He heard the Prophet ﷺ address Umar one time as he was saying, "By my father, by my father." The Prophet ﷺ said, "Allah forbids you from swearing by your fathers."Umar said, "By Allah, I never swore by them after that, neither speaking on my own nor quoting another."

Nasai 3797

Sahih

أخبرنا عبيد الله بن سعيد وقتيبة بن سعيد واللفظ له قالا حدثنا سفيان عن الزهري

عن سالم عن أبيه

أنه سمع النبي ﷺ عمر مرة وهو يقول وأبي وأبي فقال إن الله ينهاكم أن تحلفوا بآبائكم فوالله ما حلفت بها بعد ذاكرا ولا آثرا

النسائي 3797صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Oaths and vows
Chapter
Swearing by one's forefathers
Numbering
Darussalam 3797
Nasai 3797