Sahih al-Bukhari 474
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أَلاَ أُخْبِرُكُمْ عَنِ الثَّلاَثَةِ أَمَّا أَحَدُهُمْ فَأَوَى إِلَى اللَّهِ، فَآوَاهُ اللَّهُ، وَأَمَّا الآخَرُ فَاسْتَحْيَا، فَاسْتَحْيَا اللَّهُ مِنْهُ، وَأَمَّا الآخَرُ فَأَعْرَضَ، فَأَعْرَضَ اللَّهُ عَنْهُ "
Narrated Abu Waqid al-Laithi:
While Allah's Messenger (ﷺ) was sitting in the mosque (with some people) three men came, two of them came in front of Allah's Messenger (ﷺ) and the third one went away, and then one of them found a place in the circle and sat there while the second man sat behind the gathering, and the third one went away. When Allah's Messenger (ﷺ) finished his preaching, he said, "Shall I tell you about these three persons? One of them betook himself to Allah and so Allah accepted him and accommodated him; the second felt shy before Allah so Allah did the same for him and sheltered him in His Mercy (and did not punish him), while the third turned his face from Allah, and went away, so Allah turned His face from him likewise.
Full reference and source
Sahih al-Bukhari 474 In-book : Book 8, Hadith 122 USC-MSA web (English) : Vol. 1, Book 8, Hadith 463 (deprecated)
View source on Sunnah.com (opens in a new tab)