Mishkat al-Masabih 2
‘Umar b. al-Khattab said:
One day when we were with God's messenger, a man with very white clothing and very black hair came up to us. No mark of travel was visible on him, and none of us recognised him. Sitting down beside the Prophet, leaning his knees against his, and placing his hands on his thighs, he said, “Tell me, Muhammad, about Islam." He replied, “Islam means that you should testify that there is no god but God and that Muhammad is God’s messenger, that you should observe the prayer, pay the zakat , fast during Ramadan, and make the pilgrimage to the House if you have the means to go." He said, “You have spoken the truth." We were surprised at his questioning him and then declaring that he spoke the truth. He said, “Now tell me about faith.” He replied, “It means that you should believe in God, His angels, His books, His apostles, and the last day, and that you should believe in the decreeing both of good and evil." Remarking that he had spoken the truth, he then said, “Now tell me about doing good." He replied, “It means that you should worship God as though you saw Him, for He sees you though you do not see Him." He said, “Now tell me about the Hour." He replied, “The one who is asked about it is no better informed than the one who is asking." He said, “Then tell me about its signs." He replied, “That a maid-servant should beget her mistress, and that you should see barefooted, naked, poor men and shepherds exalting themselves in buildings." [‘Umar] said: He then went away, and after I had waited for a long time [the Prophet] said to me, “Do you know who the questioner was, ‘Umar?" I replied, “God and His messenger know best." He said, “He was Gabriel who came to you to teach you your religion."

Muslim transmitted it.
عَنْ عُمَرَ بْنِ الْخَطَّابِ رَضِيَ اللَّهُ عَنْهُ قَالَ: بَيْنَا نَحْنُ عِنْدَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ذَاتَ يَوْمٍ إِذْ طَلَعَ عَلَيْنَا رَجُلٌ شَدِيدُ بَيَاضِ الثِّيَابِ شَدِيدُ سَوَادِ الشَّعْرِ لَا يُرَى عَلَيْهِ أَثَرُ السَّفَرِ وَلَا يَعْرِفُهُ مِنَّا أَحَدٌ حَتَّى جَلَسَ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسلم فأسند رُكْبَتَيْهِ إِلَى رُكْبَتَيْهِ وَوَضَعَ كَفَّيْهِ عَلَى فَخْذَيْهِ وَقَالَ: يَا مُحَمَّدُ أَخْبِرْنِي عَنِ الْإِسْلَامِ قَالَ: 
" الْإِسْلَامُ: أَنْ تَشْهَدَ أَنْ لَا إِلَهَ إِلَّا اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ وَتُقِيمَ الصَّلَاةَ وَتُؤْتِيَ الزَّكَاةَ وَتَصُومَ رَمَضَانَ وَتَحُجَّ الْبَيْتَ إِنِ اسْتَطَعْتَ إِلَيْهِ سَبِيلًا ". قَالَ: صَدَقْتَ. فَعَجِبْنَا لَهُ يَسْأَلُهُ وَيُصَدِّقُهُ. قَالَ: فَأَخْبِرْنِي عَنِ الْإِيمَانِ. قَالَ: «أَنْ تُؤْمِنَ بِاللَّهِ وَمَلَائِكَتِهِ وَكُتُبِهِ وَرُسُلِهِ وَالْيَوْمِ الْآخِرِ وَتُؤْمِنَ بِالْقَدَرِ خَيْرِهِ وَشَرِّهِ» . قَالَ صَدَقْتَ. قَالَ: فَأَخْبِرْنِي عَنِ الْإِحْسَانِ. قَالَ: «أَنْ تَعْبُدَ اللَّهَ كَأَنَّكَ تَرَاهُ فَإِنْ لَمْ تَكُنْ تَرَاهُ فَإِنَّهُ يَرَاكَ» . قَالَ: فَأَخْبِرْنِي عَنِ السَّاعَةِ. قَالَ: «مَا المسؤول عَنْهَا بِأَعْلَمَ مِنَ السَّائِلِ» . قَالَ: فَأَخْبِرْنِي عَنْ أَمَارَاتِهَا. قَالَ: «أَنْ تَلِدَ الْأَمَةُ رَبَّتَهَا وَأَنْ تَرَى الْحُفَاةَ الْعُرَاةَ الْعَالَةَ رِعَاءَ الشَّاءِ يَتَطَاوَلُونَ فِي الْبُنْيَانِ» . قَالَ: ثُمَّ انْطَلَقَ فَلَبِثْتُ مَلِيًّا ثُمَّ قَالَ لِي: «يَا عُمَرُ أَتَدْرِي مَنِ السَّائِلُ» ؟ قُلْتُ: اللَّهُ وَرَسُولُهُ أَعْلَمُ. قَالَ: «فَإِنَّهُ جِبْرِيل أَتَاكُم يعلمكم دينكُمْ» . رَوَاهُ مُسلم