Hadithcore
Sahih Muslim, 1406 f
sahih

'Abd al-Malik b. Rabi' b. Sabraal-Juhanni reported on the authority of his father who narrated it on the authority of his father (i e. 'Abd al-Malik's grandfather, Sabura al-Juhanniy Allah's Messenger (ﷺ) permitted us to contract temporary marriage in the Year of Victory, as we entered Mecca, and we did come out of it but he forbade us to do it.

حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا يَحْيَى بْنُ آدَمَ، حَدَّثَنَا إِبْرَاهِيمُ بْنُ سَعْدٍ، عَنْ عَبْدِ الْمَلِكِ بْنِ الرَّبِيعِ بْنِ سَبْرَةَ الْجُهَنِيِّ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، قَالَ أَمَرَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم بِالْمُتْعَةِ عَامَ الْفَتْحِ حِينَ دَخَلْنَا مَكَّةَ ثُمَّ لَمْ نَخْرُجْ مِنْهَا حَتَّى نَهَانَا عَنْهَا‏.‏

References2 variants
In-Book Reference
Book 16, Hadith 27
USC-MSA web (English) reference
Book 8, Hadith 3257 (deprecated numbering scheme)