Abdullah bin Abbas reported,

I used to teach the Quran to Abdul-Rahman bin Awf. During the final pilgrimage that Umar performed, while we were at Mina, Abdul-Rahman said, "If you had seen the Commander of the Faithful today. A man came to him and said, 'So-and-so is saying that if the Commander of the Faithful were to die, we would pledge allegiance to so-and-so.'"Umar then said, "I shall stand up this evening and warn against these people who wish to usurp the leadership."I said, "Do not do that. The pilgrimage season gathers the common rabble of the people, and they will dominate your gathering. I fear they will not understand your words properly, and every reckless person will spread them in every direction. Wait until you reach Madinah, the abode of the Hijrah and the abode of the Sunnah. There you can address the Companions of the Messenger of Allah ﷺ from the Muhajirun and the Ansar in private. They will preserve your statement and understand it correctly."Umar said, "By Allah, I shall make this address at the very first occasion I have to stand up in Madinah."Ibn Abbas said, "When we arrived in Madinah, Umar said, 'Indeed, Allah sent Muhammad ﷺ with the truth and revealed to him the Book, and among what was revealed was the verse of stoning.'"

Bukhari 7323

Sahih

حدثنا موسى بن إسماعيل حدثنا عبد الواحد حدثنا معمر عن الزهري عن عبيد الله بن عبد الله قال حدثني

ابن عباس رضي الله عنهما قال

كنت أقرئ عبد الرحمن بن عوف فلما كان آخر حجة حجها عمر فقال عبد الرحمن بمنى لو شهدت أمير المؤمنين أتاه رجل قال إن فلانا يقول لو مات أمير المؤمنين لبايعنا فلانا فقال عمر لأقومن العشية فأحذر هؤلاء الرهط الذين يريدون أن يغصبوهم قلت لا تفعل فإن الموسم يجمع رعاع الناس يغلبون على مجلسك فأخاف أن لا ينزلوها على وجهها فيطير بها كل مطير فأمهل حتى تقدم المدينة دار الهجرة ودار السنة فتخلص بأصحاب رسول الله ﷺ من المهاجرين والأنصار فيحفظوا مقالتك وينزلوها على وجهها فقال والله لأقومن به في أول مقام أقومه بالمدينة قال ابن عباس فقدمنا المدينة فقال إن الله بعث محمدا ﷺ بالحق وأنزل عليه الكتاب فكان فيما أنزل آية الرجم

البخاري 7323صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhering to the Book and the Sunnah
Chapter
What the Prophet ﷺ mentioned and urged regarding the agreement of the people of knowledge
Numbering
Darussalam 7323
Bukhari 7323