Abu Hurairah reported,

He attributed it to the Prophet, who said, Sulayman declared, "Tonight I will go around to ninety wives, and each of them will bear a boy who will fight in the cause of Allah." It was said to him, "Say, 'If Allah wills.'" But he did not say it. He went around to them, yet none of them bore a child except one woman, who gave birth to half a person.The Messenger of Allah ﷺ said, "Had he said, 'If Allah wills,' he would not have broken his oath, and his need would have been fulfilled."

Nasai 3887

Sahih

أخبرنا العباس بن عبد العظيم قال حدثنا عبد الرزاق قال أنبأنا معمر عن ابن طاوس عن أبيه

عن أبي هريرة

رفعه قال سليمان لأطوفن الليلة على تسعين امرأة تلد كل امرأة منهن غلاما يقاتل في سبيل الله فقيل له قل إن شاء الله فلم يقل فطاف بهن فلم تلد منهن إلا امرأة واحدة نصف إنسان فقال رسول الله ﷺ لو قال إن شاء الله لم يحنث وكان دركا لحاجته

النسائي 3887صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Oaths and vows
Chapter
Exception
Numbering
Darussalam 3887
Nasai 3887