Hadith 455

نا يَحْيَى بْنُ حَبِيبِ بْنِ عَدِيٍّ الْحَارِثِيُّ ، وَأَحْمَدُ بْنُ عَبْدَةَ الضَّبِّيُّ ، قَالا : حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ ، عَنْ يَحْيَى بْنِ سَعِيدٍ ، عَنْ مُحَمَّدِ بْنِ إِبْرَاهِيمَ ، عَنْ عَلْقَمَةَ بْنِ وَقَّاصٍ اللَّيْثِيِّ ، قَالَ : سَمِعْتُ عُمَرَ بْنَ الْخَطَّابِ ، يَقُولُ : سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ : " إِنَّمَا الأَعْمَالُ بِالنِّيَّةِ " زَادَ يَحْيَى بْنِ حَبِيبٍ : " وَإِنَّمَا لامْرِئٍ مَا نَوَى "
Alqamah bin Waqas Laithi narrates that I heard Sayyiduna Umar bin Khattab (may Allah be pleased with him), he was saying that I heard the Messenger of Allah (peace and blessings be upon him) say that the acceptance of deeds depends upon the intention. Yahya bin Habib has added these words, "And indeed every person will get only that which he intended."
Hadith Reference صحيح ابن خزيمه / جماع أبواب الأذان والإقامة / 455
Hadith Takhrij صحيح بخاري