It is narrated from Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him); he said: The Messenger of Allah (peace and blessings be upon him) sent out a military expedition and said: "If Allah keeps them safe, I will certainly give Him thanks," or he said: "It is upon me, if Allah keeps them safe, to give Him thanks." So they took spoils and returned safely, and he (peace and blessings be upon him) said: "'Allahumma laka al-hamdu shukran, wa laka al-mannu fadlan' (O Allah, to You belongs praise with thanks, and from Your grace alone is this favour)." The people waited for him to do something (special by way of thanks), but they did not see him do anything, so they said: "O Messenger of Allah, you had said what you said?" He (peace and blessings be upon him) said: "Did I not say: 'O Allah, to You belongs praise with thanks, and from Your grace alone is this favour'?"
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16366