Details of the mithaq (the Covenant), also known as yawm alastu (Am I not your Lord?)
[Machine] The Prophet ﷺ said, "Allah took the covenant from the back of Adam at 'Arafah, meaning by mentioning the mountain of 'Arafah. Then, He extracted from his loins all of the offspring that He would create and dispersed them before Him like seeds, and then He addressed them from all sides and said: 'Am I not your Lord?' They replied: 'Indeed, we bear witness to it.' [This] He did lest they should say on the Day of Resurrection: 'We were not aware of this.' [This is mentioned] in His saying: 'Or [lest] you say, 'It was only that our fathers associated [others in worship] with Allah before, and we were but descendants after them. Then would You destroy us for what the falsifiers have done?' [Al-A'raf: 172-173] This is an authentic Hadith, and they did not exclude it from their collections."
عَنِ النَّبِيِّ ﷺ قَالَ: "أَخَذَ اللَّهُ الْمِيثَاقَ مِنْ ظَهْرِ آدَمَ بِنَعْمَانَ، يَعْنِي بِعَرَفَةَ، فَأَخْرَجَ مِنْ صُلْبِهِ كُلَّ ذُرِّيَّةٍ ذَرَأَهَا فَنَثَرَهُمْ بَيْنَ يَدَيْهِ كَالذَّرِّ، ثُمَّ كَلَّمَهُمْ قُبُلًا وَقَالَ: ﴿أَلَسْتُ بِرَبِّكُمْ قَالُوا بَلَى شَهِدْنَا أَنْ تَقُولُوا يَوْمَ الْقِيَامَةِ﴾ [الأعراف: ١٧٢] إِلَى قَوْلِهِ ﴿بِمَا فَعَلَ الْمُبْطِلُونَ﴾ [الأعراف: ١٧٣] «هَذَا حَدِيثٌ صَحِيحُ الْإِسْنَادِ وَلَمْ يُخَرِّجَاهُ»