Sunan Ibn Majah #4065
Tribulations 36:140
It was narrated that Umm Salamah said:
“The Prophet (ﷺ) mentionedthe army that would be swallowed up by the earth, and Umm Salamahsaid: ‘O Messenger of Allah, perhaps there will be some among themwho were forced (to join them)?’ He said: ‘They will beresurrected according to their intentions.’”