Abu Hurairah reported,

The Messenger of Allah ﷺ said, "There are three to whom Allah will not speak on the Day of Resurrection, nor will He look at them, nor will He purify them, and they shall have a painful punishment.A man who has surplus water in the desert and withholds it from a traveler.A man who sells goods to another after the afternoon prayer and swears by Allah that he paid such and such a price for them, so the buyer believes him, though it was not so.And a man who pledges allegiance to a leader only for worldly gain, so if he is given something from it he honors his pledge, and if he is not given anything from it he breaks it."

Ibn Majah 2870

Sahih

حدثنا أبو بكر بن أبي شيبة وعلي بن محمد وأحمد بن سنان قالوا حدثنا أبو معاوية عن الأعمش عن أبي صالح

عن أبي هريرة قال

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

ابن ماجه 2870صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Jihad
Chapter
Fulfilling the pledge of allegiance
Numbering
Darussalam 2870
Ibn Majah 2870