The people of Sham were mentioned in the presence of Ali bin Abu Talib while he was in Iraq, and people said, "Curse them, Commander of the Faithful."He replied, "No. I heard the Messenger of Allah ﷺ say, 'The Abdal will be in Sham, and they are forty men. Whenever one of them dies, Allah replaces him with another. Through them rain is sent down, through them victory is granted over enemies, and through them punishment is turned away from the people of Sham.'"
حدثنا أبو المغيرة حدثنا صفوان
ذكر أهل الشام عند علي بن أبي طالب رضي الله عنه وهو بالعراق فقالوا العنهم يا أمير المؤمنين قال لا إني سمعت رسول الله ﷺ يقول الأبدال يكونون بالشام وهم أربعون رجلا كلما مات رجل أبدل الله مكانه رجلا يسقى بهم الغيث وينتصر بهم على الأعداء ويصرف عن أهل الشام بهم العذاب
No references are available.
Its isnad is daif due to its disconnection. Shurayh bin Ubayd Hadrami Himsi did not meet Ali, in fact he only met a few of the companions who died later. He also has a previous disconnected narration from Umar with this same isnad, no. 107.The hadith was mentioned by Qadi al-Mulk Darimi in Dhayl Qawl Musaddad, pp. 89-90, citing it as evidence for the establishment of the hadith about the Abdal, which is weak reasoning, as you can see!It will come up again within another hadith in Musnad Ubada bin Samit, 5:322-j, where Ahmad said, "It is rejected." A detailed discussion of it will follow, Allah willing. See also no. 15611, and in the hadith of Ubada bin Samit.