Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) narrated: The Prophet (peace and blessings be upon him) sent out an expedition and said: "If Allah Almighty keeps these people safe, I will surely give thanks to Him." (The narrator is unsure; perhaps the words were:) He said: "If Allah Almighty keeps these people safe, it is binding upon me to give thanks to Him." Those people gained spoils and also returned safely, and The Prophet (peace and blessings be upon him) said: "O Allah! To You alone belongs praise, as thanks, and Yours alone is the favour, as a grace." The people waited for him, thinking he might do something, but when they did not see him do anything, they said: "O Messenger of Allah! You had said such-and-such." The Prophet (peace and blessings be upon him) said: "Did I not say: 'O Allah! To You alone belongs all praise, as thanks, and Yours alone is the favour, as a grace'?"
Imam al-Tabarani recorded it in al-Mu'jam al-Kabir; its chain contains a narrator, Sulayman bin Salim al-Madani, who is da'if (weak). (Allamah al-Haythami says:) I say: The hadith of Sayyiduna al-Nawwas bin Sam'an (may Allah be pleased with him) will come later in the chapter "A vow concerning disobedience has no standing."