Al-Adab Al-Mufrad, Book 24, Hadith 433 (English)

Abu Dharr states that he heard the Prophet, may Allah bless him and grant him peace, say, "A person who knowingly claims a father other than his own has disbelieved. A person who claims to be from a people when he is not one of them will take his place in the Fire. A person who calls a man an unbeliever or says, 'Enemy of Allah,' when that is not the case will have that come back on him."

وَبِالسَّنَدِ، عَنْ أَبِي ذَرٍّ، سَمِعَ النَّبِيَّ صلى الله عليه وسلم يَقُولُ‏:‏ مَنِ ادَّعَى لِغَيْرِ أَبِيهِ وَهُوَ يَعْلَمُ فَقَدْ كَفَرَ، وَمَنِ ادَّعَى قَوْمًا لَيْسَ هُوَ مِنْهُمْ فَلْيَتَبَوَّأْ مَقْعَدَهُ مِنَ النَّارِ، وَمَنْ دَعَا رَجُلاً بِالْكُفْرِ، أَوْ قَالَ‏:‏ عَدُوُّ اللهِ، وَلَيْسَ كَذَلِكَ إِلا حَارَتْ عَلَيْهِ‏.‏

sunnah.com