I heard the Messenger of Allah ﷺ say, "Allah, the Exalted, created His creation in darkness, then cast upon them some of His light. Whoever was struck by that light was guided, and whoever was missed by it went astray. That is why I say, the pen has dried upon the knowledge of Allah ."
سمعت رسول الله ﷺ يقول: إن الله تعالى خلق خلقه في ظلمة، فألقى عليهم من نوره، فمن أصابه من ذلك النور اهتدى، ومن أخطأه ضل. فلذلك أقول: جف القلم على علم الله عز وجل.
Tirmidhi related it (2642) from Hasan bin Arafah, who said, Ismail bin Ayyash told us, from Yahya bin Abu Amr Shaybani, from Abdullah bin Daylami, who said, I heard Abdullah bin Amr, and he mentioned it. Tirmidhi said, "A hasan hadith," and its chain is hasan because of Ismail bin Ayyash, for he is truthful in his narration from the people of his own region, and this narration is one of those. The hadith has other routes which together reach the level of sahih. See its detailed sourcing in al-Qadar wal-Qada. His statement, "The pen dried with Allah's knowledge," is from the words of Abdullah bin Amr.As for what is reported from Abu Darda, who said, I heard Abu Qasim say, "Allah says, 'O Isa, I am raising up after you a nation such that if what pleases them befalls them, they praise Allah and give thanks, and if what displeases them befalls them, they reckon it with Allah and are patient, without possessing forbearance or knowledge.' He said, 'My Lord, how can this be for them, without forbearance or knowledge?' He said, 'I grant them from My forbearance and My knowledge.'" This contains an unknown narrator.Imam Ahmad related it (27545), and Tabarani in al-Awsat (3276), and Bazzar, in Kashf Astar (2845), and Hakim graded it sahih (1/348), and Bayhaqi in al-Asma wal-Sifat (230), and Hafiz graded it hasan in Amali Mutlaqa (p. 48). All of them by way of Muawiya bin Salih, from Abu Halbas Yazid bin Maysara, who said, I heard Umm Darda say, I heard Abu Darda say, I heard Abu Qasim, I never heard him referred to by this kunya either before or after this, say (and he mentioned the hadith).Bazzar said, "We do not know of anyone among the companions who related it except Abu Darda, and Muawiya and Yunus are two Syrians, devout and trustworthy, and its chain is hasan." I say, this is an error on the part of Bazzar, for this Abu Halbas is Yazid bin Maysara, as stated in all the hadith sources, and no one narrated from him except two people, and no one deemed him trustworthy except Ibn Hibban, following his own principle of deeming unknown narrators trustworthy. Relying on this, Hafiz Haythami in al-Majma (10/67, 68) said, "Ahmad, Bazzar, and Tabarani in al-Kabir and al-Awsat related it, and the narrators of Ahmad's version are the narrators of Sahih, except for Hasan bin Sawwar and Abu Halbas Yazid bin Maysara, and both of them are trustworthy."But Hafiz Bazzar erred in thinking that Abu Halbas is Yunus bin Maysara. Yazid and Yunus are brothers, both bearing the kunya Abu Halbas. Yazid is unknown, while Yunus is trustworthy. Yazid bin Maysara is among the narrators covered in al-Tajil, while Yunus bin Maysara is among the narrators covered in al-Tahdhib, from whom Abu Dawud, Tirmidhi, and Ibn Majah narrated, and he is trustworthy and devout, as stated in al-Taqrib. Hafiz Bazzar has been described as one who errs in both the chain of transmission and the text, as Daraqutni said.As for Hakim's statement, "Sahih according to the criterion of Bukhari," this is not correct, for Abu Halbas Yazid bin Maysara is not among the narrators used by Bukhari, indeed he is not among the narrators covered in al-Tahdhib at all, as already mentioned.