Abdullah bin Abbas reported,

The Messenger of Allah ﷺ said, "Whoever attributes himself to someone other than his father, or claims allegiance to people other than his true patrons, upon him is the curse of Allah, the angels, and all people."

Ibn Majah 2609

Sahih

حدثنا أبو بشر بكر بن خلف حدثنا ابن أبي الضيف حدثنا عبد الله بن عثمان بن خثيم عن سعيد بن جبير

عن ابن عباس قال

قال رسول الله ﷺ من انتسب إلى غير أبيه أو تولى غير مواليه فعليه لعنة الله والملائكة والناس أجمعين

ابن ماجه 2609صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Legal punishments
Chapter
Who claims lineage to other than his father or affiliates with other than his patrons
Numbering
Darussalam 2609
Ibn Majah 2609