Indeed, a servant of Allāh may concern himself with a matter relating to trade or statesmanship, wishing for ease in his attainment of it. Allāh observes him and then says to the angels: Keep him away from it. For, truly, if I was to make it easy for him he will enter the Fire. So Allāh keeps him from its attainment. Then, he becomes persistently pessimistic saying: So-and-so has preceded me! So-and-so has outsmarted me! All the while it is nought but the blessing of Allāh, the Exalted in Might.
Al-Ṭabarānī narrates from the ḥadīth of Anas (رضي الله عنه) that the Prophet (صلى الله عليه وسلم) said: Allāh, the Exalted in Might said: 
From among my slaves are those whose īmān is not suited except for poverty. If I was to grant them wealth, it would lead to their corruption.
From among my slaves are those whose īmān is not suited except for being wealthy. If I was to make them destitute, it would lead to their corruption.
From among my slaves are those īmān is not suited except for being perpetually healthy. If I was to allow them to fall ill, it would lead to their corruption.
From among my slaves are those whose īmān is not suited except for perpetual sickness. If I was to grant them good health, it would lead to their corruption.
Among my slaves are those who seek to participate in a variation of worship but I block them from it such that they do not become proud.
I control the affairs of my servants with my knowledge of what they hold in their hearts. Indeed, I am the All-Knower, the Well-Acquainted.
 Weak: Narrated by Ibn Abī al-Dunyá in ‘al-Awliyāʾ’, no: 1 and Abū Nuʿaym in ‘al-Ḥilyah,’ 8:319 and others. Graded weak by Ibn Ḥajar in ‘al-Majmaʿ’ 10:270 and Shaykh al-Albānī in ‘Ḍaʿīf al-Jāmiʿ al-Ṣagīr’ no: 75. It is supported by the aforementioned quote from Ibn Masʿūd (رضي الله عنه) and the fact that it is mentioned by Ibn Rajab here and in his tafsīr (See ‘Tafsīr Ibn Rajab,’ 2:813). It was also mentioned by Shaykh al-Islām Ibn Taymiyyah in ‘Jāmiʿ al-Masāʾil,’ 8:249 and Shaykh ʿAbd al-Raḥmān ibn Nāṣir al-Saʿdī in his tafsīr (see verse 26 of sūrah al-Shūrā) with this wording. This shows that the meaning of the narration is correct, even if its grade is weak.