I say: This chain of transmission is weak. ʿAli ibn ʿAsim, who was from Wasit, was described by al-Hafiz as “truthful, but prone to error.” Ibn ʿAdi also transmitted it (fol. 114/1) through Khalid ibn Mahduj, who said, “I heard Anas ibn Malik say...” He then mentioned it in an abbreviated form attributed to the Prophet. It is reported that al-Bukhari said of this Khalid: “Yazid ibn Harun used to accuse him of lying.” Ibn ʿAdi then said: “Most of what he narrates is objectionable.”
However, it has a strong corroborating report from Abu Bakrah, which I documented in al-Mishkat (2092). Whoever wishes may consult it there. On account of it, I transferred this hadith from Silsilat al-Ahadith al-Daʿifah and Daʿif al-Jamiʿ al-Saghir to Sahih al-Jamiʿ, no. 1249.
1472 — “Obey me as long as I remain in your midst, and adhere to the Book of Allah: regard as lawful what it declares lawful, and as forbidden what it declares forbidden.”
Tamam transmitted it in al-Fawaʾid (6/111/1–2) from Sulayman ibn Ayyub ibn Hadhlam, who said: Sulayman ibn ʿAbd al-Rahman narrated to us; Muʿawiyah ibn Salih narrated to us; Ibrahim ibn Abi al-ʿAbbas narrated to me; Ibn Humayd narrated to me from Buhayr ibn Saʿd, from Khalid ibn Maʿdan, from Kathir ibn Murrah, from Nuʿaym ibn Hammar, from al-Miqdam ibn Maʿdi Karib, from Abu Ayyub al-Ansari, from ʿAwf ibn Malik al-Ashjaʿi, who said: “The Messenger of Allah delivered a sermon to us at the hottest part of the day, in a state of alarm, and said...” He then mentioned it.
He then transmitted it by way of Ahmad ibn al-Ghamr ibn Abi Hammad—in Hims—who said: Sulayman ibn ʿAbd al-Rahman narrated to us with this chain, except that he did not mention Ibrahim ibn Abi al-ʿAbbas in its chain of transmission.
I say: The first is more sound, for all the narrators in its chain are trustworthy; thus, it is authentic. As for the other, Ibn Abi Hammad was profiled by Ibn ʿAsakir in his History (2/36/1–2),