Hadithcore
Sunan Abi Dawud, 4630

Muhammad al-Firyabl said:

I heard Sufyan say: If anyone thinks that ‘All (Allah be pleased with him) was more deserving for the Caliphate than both of them, he imputed error to Abu Bakr, ‘Umar, the Muhajirun (Immigrants), and the Ansar (Helpers) Allah be pleased with all of them. I think that with this (belief) none of his action will rise to the heaven.

حَدَّثَنَا مُحَمَّدُ بْنُ مِسْكِينٍ، حَدَّثَنَا مُحَمَّدٌ، - يَعْنِي الْفِرْيَابِيَّ - قَالَ سَمِعْتُ سُفْيَانَ، يَقُولُ مَنْ زَعَمَ أَنَّ عَلِيًّا، عَلَيْهِ السَّلاَمُ كَانَ أَحَقَّ بِالْوِلاَيَةِ مِنْهُمَا فَقَدْ خَطَّأَ أَبَا بَكْرٍ وَعُمَرَ وَالْمُهَاجِرِينَ وَالأَنْصَارَ وَمَا أُرَاهُ يَرْتَفِعُ لَهُ مَعَ هَذَا عَمَلٌ إِلَى السَّمَاءِ ‏.‏

References2 variants
In-Book Reference
Book 42, Hadith 35
English Reference
Book 41, Hadith 4613