It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) asked a man: "O so-and-so! Did you do such-and-such?" He replied: "No, by the One besides whom there is no god worthy of worship (La ilaha illa huwa), I did not do it," although the Messenger of Allah (peace and blessings be upon him) knew that he had done it. So he (peace and blessings be upon him) said to him: "Allah Almighty has certainly expiated your lie by virtue of your affirming 'La ilaha illallah' (There is no god worthy of worship except Allah)." Imam Abd bin Humayd, Abu Ya'la al-Mawsili and Imam al-Hakim also recorded this hadith with their own chains. In Imam al-Hakim's narration there is the detail that the Messenger of Allah (peace and blessings be upon him) repeated the same question to him several times and each time he kept swearing the same oath, at which the Messenger of Allah (peace and blessings be upon him) finally said that Allah had expiated his lie. Imam al-Bayhaqi also recorded it in his Sunan through Imam al-Hakim's chain.
Hadith Takhrij«الحارث بن عبيد أبو قدامة الإيادي: صدوق يخطئ (التقريب، من الحفظ)؛ وبقية رجاله ثقات؛ وتابعه مسلم بن إبراهيم وأبو الربيع عنه» «(4830/1) أخرجه مجمع الزوائد ومنبع الفوائد برقم: 16811، 16812، وأخرجه البحر الزخار المعروف بمسند البزار 10 - 18 برقم: 6903» «(4830/2) أخرجه مجمع الزوائد ومنبع الفوائد برقم: 16811، 16812، وأخرجه البحر الزخار المعروف بمسند البزار 10 - 18 برقم: 6903»