Sunan an Nasai 1525
The Book of Praying for Rain (Al-Istisqa')
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ صَالِحِ بْنِ كَيْسَانَ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ، عَنْ زَيْدِ بْنِ خَالِدٍ الْجُهَنِيِّ، قَالَ مُطِرَ النَّاسُ عَلَى عَهْدِ النَّبِيِّ صلى الله عليه وسلم فَقَالَ " أَلَمْ تَسْمَعُوا مَاذَا قَالَ رَبُّكُمُ اللَّيْلَةَ قَالَ مَا أَنْعَمْتُ عَلَى عِبَادِي مِنْ نِعْمَةٍ إِلاَّ أَصْبَحَ طَائِفَةٌ مِنْهُمْ بِهَا كَافِرِينَ يَقُولُونَ مُطِرْنَا بِنَوْءِ كَذَا وَكَذَا فَأَمَّا مَنْ آمَنَ بِي وَحَمِدَنِي عَلَى سُقْيَاىَ فَذَلِكَ الَّذِي آمَنَ بِي وَكَفَرَ بِالْكَوْكَبِ وَمَنْ قَالَ مُطِرْنَا بِنَوْءِ كَذَا وَكَذَا فَذَاكَ الَّذِي كَفَرَ بِي وَآمَنَ بِالْكَوْكَبِ " .
It was narrated that Zaid bin Khalid Al-Juhani said:"It rained during the time of the Prophet (ﷺ) and he said: 'Have you nt heard what your Lord said this night? He said: I have never sent down any blessing upon My slaves but some of them become disbelievers thereby, saying: 'We have been given rain by such and such a star.' As for the one who believes in Me and praises Me for giving rain, that is the one who believes in Me and disbelieves in the stars. But the one who says: 'We have been given rain by such and such a star' he has disbelieved in Me and believed in the stars
Grading: Abu Ghuddah: Sahih · Al-Albani: Sahih · Zubair Ali Zai: Sahih - Agreed Upon
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.