Sahih Muslim 1373
The Book of Mosques and Places of Prayer
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَعَمْرٌو النَّاقِدُ، وَزُهَيْرُ بْنُ حَرْبٍ، قَالُوا حَدَّثَنَا ابْنُ عُيَيْنَةَ، ح قَالَ وَحَدَّثَنَا أَبُو كُرَيْبٍ، أَخْبَرَنَا ابْنُ الْمُبَارَكِ، عَنْ مَعْمَرٍ، وَالأَوْزَاعِيِّ، وَمَالِكِ بْنِ أَنَسٍ، وَيُونُسَ، ح قَالَ وَحَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنَا أَبِي ح، قَالَ وَحَدَّثَنَا ابْنُ الْمُثَنَّى، حَدَّثَنَا عَبْدُ الْوَهَّابِ، جَمِيعًا عَنْ عُبَيْدِ اللَّهِ، كُلُّ هَؤُلاَءِ عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم بِمِثْلِ حَدِيثِ يَحْيَى عَنْ مَالِكٍ وَلَيْسَ فِي حَدِيثِ أَحَدٍ مِنْهُمْ " مَعَ الإِمَامِ " . وَفِي حَدِيثِ عُبَيْدِ اللَّهِ قَالَ " فَقَدْ أَدْرَكَ الصَّلاَةَ كُلَّهَا " .
This hadith has been narrated on the authority of Malik and there is no mention of" along with the Imam" and In the hadith transmitted by Abdullah the words are:" he in fact finds the entire prayer
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.