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."
حدثنا أبو بشر بكر بن خلف حدثنا ابن أبي الضيف حدثنا عبد الله بن عثمان بن خثيم عن سعيد بن جبير
قال رسول الله ﷺ من انتسب إلى غير أبيه أو تولى غير مواليه فعليه لعنة الله والملائكة والناس أجمعين
[Sahih] Muhammad bin Abu Sayf is mastur (of unclear status), but Wahib corroborated him, as recorded by Ibn Hibban (Mawarid), no. 1217 and elsewhere, and its isnad is sahih. It has a corroborating witness in Muslim's Sahih, Hajj, chapter on the virtue of Madinah, etc., no. 1370, and its basis is in Sahih Bukhari, no. 1870, 3179, 3172, 7300, 6755.