Sunan an-Nasa'i
It was narrated that Ibn 'Umar said: "The Messenger of Allah (ﷺ) said: 'Whoever swears, let him not swear by anything other than Allah.'" The Quraish used to swear by their forefathers, and so he said: "Do not swear by your forefathers."
أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ، عَنْ إِسْمَاعِيلَ، - وَهُوَ ابْنُ جَعْفَرٍ - قَالَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ كَانَ حَالِفًا فَلاَ يَحْلِفْ إِلاَّ بِاللَّهِ " . وَكَانَتْ قُرَيْشٌ تَحْلِفُ بِآبَائِهَا فَقَالَ " لاَ تَحْلِفُوا بِآبَائِكُمْ " .
Grade: sahih (Darussalam)
Reference