Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "La ilaha illallah (there is no god but Allah) keeps the servant protected from the displeasure of Allah Almighty, as long as the servant does not prefer his worldly dealings over his religion. When he does that and then says La ilaha illallah, Allah Almighty says: 'You have lied.'"
Al-Bazzar recorded it, and its chain is hasan (good).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الفتن - أعاذنا الله منها / 12188