I came in to see Muawiya, and he said, "What a pleasant surprise to have you here, Abu so-and-so." This is an expression the Arabs use.I said, "I have come to tell you a hadith I heard. I heard the Messenger of Allah ﷺ say, 'Whomever Allah places in charge of any of the affairs of the Muslims, then he screens himself off from their needs, their hardship, and their poverty, Allah will screen Himself off from him when he is in need, in hardship, and in poverty.'"So Muawiya appointed a man to attend to the needs of the people.
دخلت على معاوية، فقال: ما أنعمنا بك أبا فلان. وهى كلمة تقولها العرب، فقلت: حديثا سمعته أخبرك به، سمعت رسول الله ﷺ يقول: من ولاه الله عز وجل شيئا من أمر المسلمين، فاحتجب دون حاجتهم وخلتهم وفقرهم احتجب الله عنه دون حاجته وخلته وفقره. قال: فجعل رجلا على حوائج الناس
Reported by Abu Dawud (2948), Tirmidhi (1333), and Hakim (4/93–94), all from the hadith of Yazid bin Abu Maryam, that Qasim bin Mukhaymara informed him, that Abu Maryam Azdi informed him, and he related it. The hadith, with this wording, is from Abu Dawud. Tirmidhi passed over it in silence. Hakim said, "This is a hadith sahih in isnad, and its isnad is a sound Syrian isnad." I say, in Hakim's isnad is Baqiya bin Walid, who narrates from Yazid bin Abu Maryam, though he is corroborated in the versions of the other scholars.Tirmidhi (1332), Ahmad (18033), and Hakim (4/94) reported it by another route, from Ali bin Hakam (who is Banani), who said, Abu Hasan told me, saying, Amr bin Mura said to Muawiya, "I heard the Messenger of Allah ﷺ say, 'There is no ruler who shuts his door against the needy, the destitute, and the poor, except that Allah shuts the gates of heaven against his own poverty, need, and destitution.'" So Muawiya appointed a man to look after the needs of the people. Hakim graded it sahih.I say, in it is Abu Hasan, who is Jazari, from whom only Ali bin Hakam transmitted, and he was not deemed reliable, so he is unknown. This is why Tirmidhi said, "The hadith of Amr bin Mura is a gharib hadith, and this hadith has been narrated by a route other than this one." End of quote, and that is the first route.