From Sahih Bukhari (Hadith 2042):
Narrated `Abdullah bin `Umar:`Umar bin Al-Khattab said, "O Allah's Messenger (ﷺ)! I vowed in the Pre-Islamic period to perform I`tikaf in Al-Masjid-al-Haram for one night." The Prophet (ﷺ) said, "Fulfill your vow." So, he performed I`tikaf for one night
Reference: Bukhari 2042