(Imām Bukhārī narrates): Ismail narrated the hadith to us, he said: Imam Malik narrated the hadith to me, from Salih bin Kaisan, from Ubaidullah bin Abdullah bin Utbah bin Mas'ud, from Zaid bin Khalid al-Juhani, he narrated that
the Messenger of Allāh ﷺ led the morning prayer at Hudaibiyah, at that time there was a trace on the sky of the night's rain. When the Prophet ﷺ turned and faced towards the people, he said: "Do you know what your Lord has said?" The Companions said: "Allāh and His Messenger know best." (He ﷺ informed:) Allāh, Glorified is He, said: "My servants entered the morning in a state where some of them were believers in Me and some of them were disbelievers in Me. So as for those who said that it rained by the grace of Allāh and His mercy, they were believers in Me and disbelievers in the stars, and as for those who said that it rained because of such and such a star, they were disbelievers in Me and believers in the stars."
حَدَّثَنَا إِسْمَاعِيلُ حَدَّثَنِي مَالِكٌ عَنْ صَالِحِ بْنِ كَيْسَانَ عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ بْنِ عُتْبَةَ بْنِ مَسْعُودٍ عَنْ زَيْدِ بْنِ خَالِدٍ الْجُهَنِيِّ أَنَّهُ قَالَ صَلَّى لَنَا رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ صَلَاةَ الصُّبْحِ بِالْحُدَيْبِيَةِ عَلَى إِثْرِ سَمَاءٍ كَانَتْ مِنْ اللَّيْلَةِ فَلَمَّا انْصَرَفَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَقْبَلَ عَلَى النَّاسِ فَقَالَ هَلْ تَدْرُونَ مَاذَا قَالَ رَبُّكُمْ قَالُوا اللَّهُ وَرَسُولُهُ أَعْلَمُ قَالَ أَصْبَحَ مِنْ عِبَادِي مُؤْمِنٌ بِي وَكَافِرٌ فَأَمَّا مَنْ قَالَ مُطِرْنَا بِفَضْلِ اللَّهِ وَرَحْمَتِهِ فَذَلِكَ مُؤْمِنٌ بِي كَافِرٌ بِالْكَوْكَبِ وَأَمَّا مَنْ قَالَ بِنَوْءِ كَذَا وَكَذَا فَذَلِكَ كَافِرٌ بِي مُؤْمِنٌ بِالْكَوْكَبِ
Reference: Sahih Al Bukhari 1038