English : Vol. 5, Book 37, Hadith 4202
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
قَالَ اللَّهُ عَزَّ وَجَلَّ أَنَا أَغْنَى الشُّرَكَاءِ عَنِ الشِّرْكِ فَمَنْ عَمِلَ لِي عَمَلاً أَشْرَكَ فِيهِ غَيْرِي فَأَنَا مِنْهُ بَرِيءٌ وَهُوَ لِلَّذِي أَشْرَكَ "
It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
"Allah says: "I am the Most Self-Sufficient and I have no need for an associate. Thus he who does an action for someone else's sake as well as Mine will have that action renounced by Me to him whom he associated with Me.'"
Full reference and source
English : Vol. 5, Book 37, Hadith 4202 Arabic : Book 37, Hadith 4342
View source on Sunnah.com (opens in a new tab)