ENOfficial
'Amr b. 'As reported: I heard it from the Messenger of Allah (ﷺ) quite audibly and not secretly: Behold! the posterity of my fathers, that is, so and so, are not my friends. Verily Allah and the pious believers are my friends.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنِي أَحْمَدُ بْنُ حَنْبَلٍ، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ إِسْمَاعِيلَ بْنِ أَبِي خَالِدٍ، عَنْ قَيْسٍ، عَنْ عَمْرِو بْنِ الْعَاصِ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم جِهَارًا غَيْرَ سِرٍّ يَقُولُ " أَلاَ إِنَّ آلَ أَبِي - يَعْنِي فُلاَنًا - لَيْسُوا لِي بِأَوْلِيَاءَ إِنَّمَا وَلِيِّيَ اللَّهُ وَصَالِحُ الْمُؤْمِنِينَ " .
sunnah.com