Sahih al-Bukhari 3594
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 Sa`id Al-Khudri:
The Prophet (ﷺ) said, "A time will come when the people will wage holy war, and it will be asked, 'Is there any amongst you who has enjoyed the company of Allah's Messenger (ﷺ)?' They will say: 'Yes.' And then victory will be bestowed upon them. They will wage holy war again, and it will be asked: 'Is there any among you who has enjoyed the company of the companions of Allah's Messenger (ﷺ) ?' They will say: 'Yes.' And then victory will be bestowed on them."
Full reference and source
Sahih al-Bukhari 3594 In-book : Book 61, Hadith 101 USC-MSA web (English) : Vol. 4, Book 56, Hadith 792 (deprecated)
View source on Sunnah.com (opens in a new tab)