It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "With each one of you a companion (devil) from among the jinn has been appointed." The Companions (may Allah be pleased with them) said: "And with you too?" He (peace and blessings be upon him) said: "Yes, with me too, but Allah, the Mighty and Majestic, helped me against him, so he submitted (became Muslim), and he commands me only to good."
Hadith Referenceالمعجم الأوسط / باب الألف / 2593
Hadith Takhrij«قال الدارقطني: الصواب عن سالم عن أبيه عن ابن مسعود «العلل الواردة في الأحاديث النبوية، ج 5، ص 343»» «أخرجه مسلم فى «صحيحه» برقم: 2814، وابن خزيمة فى «صحيحه» برقم: 658، وابن حبان فى «صحيحه» برقم: 6417، والدارمي فى «مسنده» برقم: 2776، وأحمد فى «مسنده» برقم: 3722، 3855، 3878، 4478، وأبو يعلى فى «مسنده» برقم: 5143، والبزار فى «مسنده» برقم: 1870، 1871، والطحاوي فى «شرح مشكل الآثار» برقم: 109، والطبراني فى «الكبير» برقم: 10522، 10523، 10524»