Anas bin Malik reported,

The Messenger of Allah ﷺ said, "When Allah intends good for a servant, He puts him to use."Someone asked, "How does He put him to use, Messenger of Allah?"He replied, "He grants him success in performing a righteous deed before death."

Azami 1052

Sahih

عن أنس، قال

قال رسول الله ﷺ: إذا أراد الله بعبد خيرا استعمله. فقيل: كيف يستعمله يا رسول الله؟ قال: يوفقه لعمل صالح قبل الموت.

الأعظمي 1052صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
If Allah wants good for a servant, He employs him and guides him to Islam
Numbering
Jami al-Kamil 1052 (2nd edition)