Hadithcore
Sahih al-Bukhari, 4718
sahih

Narrated Ibn `Umar:

On the Day of Resurrection the people will fall on their knees and every nation will follow their prophet and they will say, "O so-and-so! Intercede (for us with Allah), "till (the right) intercession is given to the Prophet (Muhammad) and that will be the day when Allah will raise him into a station of praise and glory (i.e. Al-Maqam -al-Mahmud).

حَدَّثَنِي إِسْمَاعِيلُ بْنُ أَبَانَ، حَدَّثَنَا أَبُو الأَحْوَصِ، عَنْ آدَمَ بْنِ عَلِيٍّ، قَالَ سَمِعْتُ ابْنَ عُمَرَ، رضى الله عنهما يَقُولُ إِنَّ النَّاسَ يَصِيرُونَ يَوْمَ الْقِيَامَةِ جُثًا، كُلُّ أُمَّةٍ تَتْبَعُ نَبِيَّهَا، يَقُولُونَ يَا فُلاَنُ اشْفَعْ، حَتَّى تَنْتَهِيَ الشَّفَاعَةُ إِلَى النَّبِيِّ صلى الله عليه وسلم فَذَلِكَ يَوْمَ يَبْعَثُهُ اللَّهُ الْمَقَامَ الْمَحْمُودَ‏.‏

References2 variants
In-Book Reference
Book 65, Hadith 240
USC-MSA web (English) reference
Vol. 6, Book 60, Hadith 242 (deprecated numbering scheme)