Hadithcore
Riyad as-Salihin, 62

Ibn Abbas (May Allah be pleased with them) said:

One day, I was riding behind the Prophet (ﷺ) when he said, "O boy! I will instruct you in some matters. Be watchful of Allah (Commandments of Allah), He will preserve you. Safeguard His Rights, He will be ever with you. If you beg, beg of Him Alone; and if you need assistance, supplicate to Allah Alone for help. And remember that if all the people gather to benefit you, they will not be able to benefit you except that which Allah had foreordained (for you); and if all of them gather to do harm to you, they will not be able to afflict you with anything other than that which Allah had pre-destined against you. The pens had been lifted and the ink had dried up". <b>[At- Tirmidhi, who categorized it as Hadith Hasan Sahih]</b>.

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

References1 variant
In-Book Reference
Introduction, Hadith 62
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) It prohibits asking other than Allah Almighty for things only Allah is able to do, such as provision, healing, forgiveness, and victory among others. The believer should be keen on correcting his Tawhid of Allah Almighty through asking none but Allah, Glorified and Exalted.<br> 2) Recognizing the incompetence of all created beings and their need to Allah Almighty drives the servant to attach his heart to Allah alone without any partner, while severing all attachments to created beings.<br> 3) The servant cannot bring himself any good nor fend off any harm except with the permission of Allah. This requires that the servant worships Allah alone, seeks His assistance, and attaches his heart to none of the people regardless of their status or prestige because they are just as weak as he is and just as needy to Allah Almighty as he is.<br> 4) Mindfulness of Allah, Glorified and Exalted, and maintaining publicly and secretly the limits He set secure Allah’s preservation and protection of the servant, because the reward for a deed is of the same nature of the deed.<br> <br> <br> <br> <b>Words in the Hadith:</b><br> Being mindful of Allah: it means be mindful of His religion by adhering to fear of Him, maintaining the limits and rights He set, and fulfilling the rights of the people.<br> The pens have been lifted and the pages have dried: it means no more writing because all destinies have already been written.