Abu al-Tufayl narrates from Hudhayfah bin Asid (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Last night my entire Ummah, from the first of it to the last, was presented to me beside this very chamber." A man said: O Messenger of Allah, those presented to you were the ones who have already been created; how were those who have not yet been created presented to you? He (peace and blessings be upon him) said: "They were formed for me in clay, so that I know each person among them better than any of you knows his companion."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 3042