Sahih al-Bukhari 7054
صحيح البخاري#7054SahihNarrated Ibn `Abbas:The Prophet (ﷺ) said, "Whoever notices something which he dislikes done by his ruler, then he should be patient, for whoever becomes separate from the company of the Muslims even for a span and then dies, he will die as those who died in the Pre-Islamic period of Ignorance (as rebellious sinners). (Fath-ul-Bari page 112, Vol)
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Every narration in Sahih al-Bukhari is accepted as Sahih (authentic) by the established status of the book.
In-book reference: 92:7