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.
muslim:3030dḤajjāj b. al-Shāʿir > ʿAbd al-Ṣamad b. ʿAbd al-Wārith from my father > Ḥusayn > Qatādah > ʿAbdullāh b. Maʿbad al-Zimmānī > ʿAbdullāh b. ʿUtbah > ʿAbdullāh b. Masʿūd Ūlaʾik al--Adhīn Yadʿūn Yabtaghūn > Rabbihim al-Wasīlah

" Those whom they call upon, themselves seek the means of access to their Lord," that that verse was revealed in connection with a party of Arabs who used to worship a group amnogst the jinn; the jinn embraced Islam but the people kept worshipping them without being conscious of it. Then this verse was revealed:" Those whom they call upon, themselves seek the means of access to their Lord."  

مسلم:٣٠٣٠dوَحَدَّثَنِي حَجَّاجُ بْنُ الشَّاعِرِ حَدَّثَنَا عَبْدُ الصَّمَدِ بْنُ عَبْدِ الْوَارِثِ حَدَّثَنِي أَبِي حَدَّثَنَا حُسَيْنٌ عَنْ قَتَادَةَ عَنْ عَبْدِ اللَّهِ بْنِ مَعْبَدٍ الزِّمَّانِيِّ عَنْ عَبْدِ اللَّهِ بْنِ عُتْبَةَ عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ { أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ} قَالَ

نَزَلَتْ فِي نَفَرٍ مِنَ الْعَرَبِ كَانُوا يَعْبُدُونَ نَفَرًا مِنَ الْجِنِّ فَأَسْلَمَ الْجِنِّيُّونَ وَالإِنْسُ الَّذِينَ كَانُوا يَعْبُدُونَهُمْ لاَ يَشْعُرُونَ فَنَزَلَتْ { أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ}  


See similar narrations below:

Collected by Ṭabarānī
tabarani:9798al-ʿAbbās b. al-Faḍl al-Asfāṭī > ʿAbd al-Aʿlá b. Ḥammād al-Narsī > Yazīd b. Zurayʿ > Saʿīd b. Abū ʿArūbah > Qatādah > ʿAbdullāh b. Maʿbad al-Rummānī > ʿAbdullāh b. ʿUtbah b. Masʿūd > ʿAbdullāh b. Masʿūd

[Machine] A group of Arabs who were worshipping a group of jinn descended, and the jinn and the group of Arabs who were worshipping them embraced Islam, not realizing the meaning of the verse they recited: "Those whom they invoke seek means of access to their Lord."  

الطبراني:٩٧٩٨حَدَّثَنَا الْعَبَّاسُ بْنُ الْفَضْلِ الْأَسْفَاطِيُّ ثنا عَبْدُ الْأَعْلَى بْنُ حَمَّادٍ النَّرْسِيُّ ثنا يَزِيدُ بْنُ زُرَيْعٍ عَنْ سَعِيدِ بْنِ أَبِي عَرُوبَةَ عَنْ قَتَادَةَ عَنْ عَبْدِ اللهِ بْنِ مَعْبَدٍ الرُّمَّانِيِّ عَنْ عَبْدِ اللهِ بْنِ عُتْبَةَ بْنِ مَسْعُودٍ عَنْ حَدِيثِ عَبْدِ اللهِ بْنِ مَسْعُودٍ قَالَ

نَزَلَتْ فِي نَفَرٍ مِنَ الْعَرَبِ كَانُوا يَعْبُدُونَ نَفَرًا مِنَ الْجِنِّ فَأَسْلَمَ الْجِنِّيُّونَ وَالنَّفَرُ مِنَ الْعَرَبِ لَا يَشْعُرُونَ فِي قَوْلِهِ {أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ}