Abdullah bin Abbas reported,

He heard the Prophet ﷺ say, "Whoever claims descent from someone other than his father, or attaches himself as a client to people other than his rightful patrons, upon him is the curse of Allah, the angels, and all of mankind."

Azami 580

Sahih

عن ابن عباس

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

الأعظمي 580صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the angels
Section
Curse of the angels upon one who claims lineage to other than his father or allies with other than his masters
Numbering
Jami al-Kamil 580 (2nd edition)
Azami 580