Abdullah bin Abbas reported,

One day I was riding behind the Messenger of Allah ﷺ when he said, "Young man, let me teach you some words. Be mindful of Allah, and He will protect you. Be mindful of Allah, and you will find Him before you. When you ask, ask Allah. When you seek help, seek help from Allah. Know that if the entire nation were to gather together to benefit you with something, they could not benefit you except with what Allah has already written for you. And if they were to gather together to harm you with something, they could not harm you except with what Allah has already written against you. The pens have been lifted and the pages have dried."

Azami 1098

Hasan

عن ابن عباس، قال

كنت خلف رسول الله ﷺ يوما، فقال: يا غلام إني أعلمك كلمات: احفظ الله يحفظك، احفظ الله تجده تجاهك، إذا سألت فاسأل الله، وإذا استعنت فاستعن بالله، واعلم أن الأمة لو اجتمعت على أن ينفعوك بشيء لم ينفعوك إلا بشيء قد كتبه الله لك، ولو اجتمعوا على أن يضروك بشيء لم يضروك إلا بشيء قد كتبه الله عليك، رفعت الأقلام، وجفت الصحف.

الأعظمي 1098حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
No one being able to benefit you with anything except what Allah has decreed for you
Numbering
Jami al-Kamil 1098 (2nd edition)
Azami 1098