Sunan Ibn Majah, Book 36, Hadith 140 (In-Book)

It was narrated that Umm Salamah said: “The Prophet mentioned the army that would be swallowed up by the earth, and Umm Salamah said: ‘O Messenger of Allah, perhaps there will be some among them who were forced (to join them)?’ He said: ‘They will be resurrected according to their intentions.’”

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

sunnah.com