He came to Muawiya, entered upon him, and said, "I heard the Messenger of Allah ﷺ say, 'Whoever is given authority over the affairs of the people and then shuts his door against the poor, the oppressed, or the needy, Allah will shut the doors of His mercy against him at the time of his need and poverty, when he is most in want of it.'"
حدثنا أبو سعيد مولى بني هاشم قال حدثنا زائدة قال حدثنا السائب بن حبيش
أنه أتى معاوية فدخل عليه وقال سمعت رسول الله ﷺ يقول من ولي أمر الناس ثم أغلق بابه دون المسكين أو المظلوم أو ذي الحاجة أغلق الله عز وجل دونه أبواب رحمته عند حاجته وفقره أفقر ما يكون إليها
Its isnad is daif due to the anonymity of Abu Shatha, and the hadith has already appeared with its full chain and text at 15588, where we graded it hasan based on its corroborating evidence.