Hadithcore
Sunan Abi Dawud, 4635
sahih· Al-Albani

Abu Bakrah said:

One day the Prophet (ﷺ) asked: Which of you had a dream? He then mentioned the rest of the tradition to the same effect, but he did not mention the word “disliked”. Instead, he said: The Messenger of Allah (ﷺ) was grieved about that. He then said: There will be a caliphate on the model of prophecy, then Allah will give the kingdom to whom he wills.

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

References2 variants
In-Book Reference
Book 42, Hadith 40
English Reference
Book 41, Hadith 4618