Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates from the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) said to a man: "Did you do such-and-such?" He swore by Allah that he had not done it. Then Jibril (peace be upon him) came and said that he had done it, but Allah Almighty had forgiven him because of 'La ilaha illallah' (There is none worthy of worship except Allah).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19879