Abdullah bin Umar reported,

The Messenger of Allah ﷺ said, "Whoever takes an oath must swear only by Allah."The Quraysh used to swear by their forefathers, so he said, "Do not swear by your forefathers."

Nasai 3795

Sahih

أخبرنا علي بن حجر عن إسمعيل وهو ابن جعفر قال حدثنا عبد الله بن دينار

عن ابن عمر قال

قال رسول الله ﷺ من كان حالفا فلا يحلف إلا بالله وكانت قريش تحلف بآبائها فقال لا تحلفوا بآبائكم

النسائي 3795صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Oaths and vows
Chapter
Severity of swearing by other than Allah
Numbering
Darussalam 3795
Nasai 3795