Umar bin Khattab reported,

Messenger of Allah, during the days of ignorance I made a vow to perform itikaf for one night in the Sacred Mosque.The Prophet ﷺ said to him, "Fulfill your vow."So he performed itikaf for one night.

Bukhari 2042

Sahih

حدثنا إسماعيل بن عبد الله عن أخيه عن سليمان بن بلال عن عبيد الله بن عمر عن نافع عن عبد الله بن عمر

عن عمر بن الخطاب رضي الله عنه أنه قال

يا رسول الله إني نذرت في الجاهلية أن أعتكف ليلة في المسجد الحرام فقال له النبي ﷺ أوف نذرك فاعتكف ليلة

البخاري 2042صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Itikaf
Chapter
He who does not consider fasting obligatory when performing itikaf
Numbering
Darussalam 2042
Bukhari 2042