Sahih Muslim, Book 27, Hadith 6 (Muslim 4220)

Ibn 'Umar heard Allah's Messenger (ﷺ) as saying:

He who has to take an oath, he must not take oath but by Allah. The Quraish used to take oath by their fathers. So he (the Holy Prophet) said: Do not take oath by your fathers.