Ibn al-Daylami Abdullah (may Allah have mercy on him) said: I said to Sayyiduna Abdullah bin Amr (may Allah be pleased with them both): "It has reached me that you narrate that the wretched one is the one who was written wretched in his mother's womb!" He said: "Listen! I do not consider it permissible for anyone to tell a lie attributing it to me. The truth is that I heard the Messenger of Allah (peace and blessings be upon him) say: 'Indeed, Allah, the Mighty and Majestic, created His creation in darkness, then He cast upon them some of His light. So whoever was reached by some of that light was guided, and whoever missed it went astray.'"
Abu Ya'la al-Mawsili also narrated it via Abbas bin al-Walid al-Narsi from Ibn al-Mubarak.
Its chain is sahih (authentic).
I say: Imam Ahmad bin Hanbal, Ahmad bin Mani', al-Tirmidhi, al-Nasa'i and Ibn Majah also narrated it in abridged form via Abdullah bin Fayruz al-Daylami.