It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Allah, the Mighty and Majestic, says: Whoever shows enmity to a friend (wali) of Mine has declared war on Me. And I do not hesitate in doing anything as I hesitate over (taking) the death of the believer: he dislikes death and I dislike hurting him. And sometimes My believing friend asks Me for wealth, so I turn him away from wealth towards poverty, whereas had I turned him towards wealth, it would have been bad for him. And sometimes My believing friend asks Me for poverty, so I turn him towards wealth, whereas had I turned him towards poverty, it would have been bad for him. Indeed, Allah, the Mighty and Majestic, said: By My might, My majesty, My loftiness, My beauty and splendour, and the elevation of My station! No servant prefers My pleasure over his own desire except that I fix his appointed time of death before his eyes, the heavens and the earth become guarantors of his provision, and I am (his Helper) for him behind the trade of every trader."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12665