Kaab bin Ujra reported,

The Messenger of Allah ﷺ came out to us while we were nine men, five and four, one group from the Arabs and the other from the non-Arabs. He said, "Listen. Have you heard that there will come after me rulers, whoever enters upon them and confirms their lies and assists them in their oppression is not from me and I am not from him, and he will not come to me at the Pond. And whoever does not enter upon them, does not confirm their lies, and does not assist them in their oppression is from me and I am from him, and he will come to me at the Pond."

Nasai 4213

Sahih

أخبرنا هارون بن إسحق قال حدثنا محمد يعني ابن عبد الوهاب قال حدثنا مسعر عن أبي حصين عن الشعبي عن عاصم العدوي

عن كعب بن عجرة قال

خرج إلينا رسول الله ﷺ ونحن تسعة خمسة وأربعة أحد العددين من العرب والآخر من العجم فقال اسمعوا هل سمعتم أنه ستكون بعدي أمراء من دخل عليهم فصدقهم بكذبهم وأعانهم على ظلمهم فليس مني ولست منه وليس يرد علي الحوض ومن لم يدخل عليهم ولم يصدقهم بكذبهم ولم يعنهم على ظلمهم فهو مني وأنا منه وسيرد علي الحوض

النسائي 4213صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Pledge of allegiance
Chapter
Those who do not aid a ruler in oppression
Numbering
Darussalam 4213
Nasai 4213