Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:4862Abū Maʿmar > ʿAbd al-Wārith > Ayyūb > ʿIkrimah > Ibn ʿAbbās

The Prophet ﷺ performed a prostration when he finished reciting Surat-an-Najm, and all the Muslims and pagans and Jinns and human beings prostrated along with him.  

البخاري:٤٨٦٢حَدَّثَنَا أَبُو مَعْمَرٍ حَدَّثَنَا عَبْدُ الْوَارِثِ حَدَّثَنَا أَيُّوبُ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ ؓ قَالَ

سَجَدَ النَّبِيُّ ﷺ بِالنَّجْمِ وَسَجَدَ مَعَهُ الْمُسْلِمُونَ وَالْمُشْرِكُونَ وَالْجِنُّ وَالإِنْسُ  

تَابَعَهُ ابْنُ طَهْمَانَ عَنْ أَيُّوبَ وَلَمْ يَذْكُرِ ابْنُ عُلَيَّةَ ابْنَ عَبَّاسٍ

See similar narrations below:

Collected by Bukhārī, Ibn Ḥibbān
bukhari:1071Musaddad > ʿAbd al-Wārith > Ayyūb > ʿIkrimah > Ibn ʿAbbās

The Prophet ﷺ I prostrated while reciting An-Najm and with him prostrated the Muslims, the pagans, the jinns, and all human beings.  

البخاري:١٠٧١حَدَّثَنَا مُسَدَّدٌ قَالَ حَدَّثَنَا عَبْدُ الْوَارِثِ قَالَ حَدَّثَنَا أَيُّوبُ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ ؓ

أَنَّ النَّبِيَّ ﷺ سَجَدَ بِالنَّجْمِ وَسَجَدَ مَعَهُ الْمُسْلِمُونَ وَالْمُشْرِكُونَ وَالْجِنُّ وَالإِنْسُ وَرَوَاهُ ابْنُ طَهْمَانَ عَنْ أَيُّوبَ  

ذِكْرُ مَا يُسْتَحَبُّ لِلْمَرْءِ إِذَا قَرَأَ سُورَةَ النَّجْمِ اسْتِعْمَالُ السُّجُودِ لِلَّهِ جَلَّ وَعَلَا

ibnhibban:2763al-Ḥasan b. Sufyān > al-Ḥasan b. ʿUmar b. Shaqīq And ʿUmar b. Yazīd al-Sayyārī > ʿAbd al-Wārith b. Saʿīd > Ayyūb > ʿIkrimah > Ibn ʿAbbās

[Machine] "That the Messenger of Allah ﷺ prostrated to the star, and the Muslims, polytheists, jinn, and humans also prostrated with him."  

ابن حبّان:٢٧٦٣أَخْبَرَنَا الْحَسَنُ بْنُ سُفْيَانَ قَالَ حَدَّثَنَا الْحَسَنُ بْنُ عُمَرَ بْنِ شَقِيقٍ وَعُمَرُ بْنُ يَزِيدَ السَّيَّارِيُّ قَالَا حَدَّثَنَا عَبْدُ الْوَارِثِ بْنُ سَعِيدٍ عَنْ أَيُّوبَ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ

«أَنَّ رَسُولَ اللَّهِ ﷺ سَجَدَ فِي النَّجْمِ وَسَجَدَ مَعَهُ الْمُسْلِمُونَ وَالْمُشْرِكُونَ وَالْجِنُّ وَالْإِنْسُ»