Sunan an-Nasa'i, Volume 4, Book 35, Hadith 3852 (DarusSalam) ⓘ
It was narrated that Ibn 'Umar said: "Umar had made a vow to spend a night in 'Itikaf in Al-Masjid Al-Haram. He asked the Messenger of Allah about that, and he ordered him to perform the 'Itikaf."
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ يَزِيدَ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ كَانَ عَلَى عُمَرَ نَذْرٌ فِي اعْتِكَافِ لَيْلَةٍ فِي الْمَسْجِدِ الْحَرَامِ فَسَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ ذَلِكَ فَأَمَرَهُ أَنْ يَعْتَكِفَ .
also referenced under: Hadith 3821 (Reference) & Book 35, Hadith 61 (In-Book)