Sahih Muslim Book 27, Hadith 2
" I did not take oath by (anyone else except Allah) since I heard Allah's Messenger forbidding it. nor did I speak in such terms, and the narrator did not say," on my own behalf or on behalf of someone else".
Allah, the Great and Majestic, forbids you to swear by your fathers. Umar said: By Allah. I have never sworn (by my father) since I heard Allah's Messenger (ﷺ) forbidding it mentioning them" on my behalf" nor on behalf of someone else.
Salim reported on the authority of his father that Allah's Apostle (ﷺ) heard 'Umar while he was taking oath by his father. The rest of the hadith is the same.