Abdullah bin Abbas reported,

"Allah is sufficient for us, and He is the best Disposer of affairs" [Aal Imran 3:173] was said by Ibrahim عليه السلام when he was cast into the fire, and it was said by Muhammad ﷺ when the people told him, "Indeed, the people have gathered against you, so fear them. But it only increased them in faith, and they said, 'Allah is sufficient for us, and He is the best Disposer of affairs.'" [Aal Imran 3:173].

Azami 11144

Sahih

عن ابن عباس

{حسبنا الله ونعم الوكيل} قالها إبراهيم عليه السلام حين ألقي في النار، وقالها محمد ﷺ حين قالوا: {إن الناس قد جمعوا لكم فأخشوهم فزادهم إيمنا وقالوا حسبنا الله ونعم الوكيل} [سورة آل عمران: ١٧٣].

الأعظمي 11144صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications of jihad
Section
What to say when fearing a people
Numbering
Jami al-Kamil 11144 (2nd edition)
Azami 11144