The Prophet ﷺ mentioned the story of the army that would be swallowed up by the earth.I asked, "Messenger of Allah, what about those among them who were unwilling?"He replied, "They will be swallowed up along with the rest, but on the Day of Resurrection they will be raised according to their intentions."
حدثنا عثمان بن أبي شيبة حدثنا جرير عن عبد العزيز بن رفيع عن عبيد الله ابن القبطية
عن النبي ﷺ بقصة جيش الخسف قلت يا رسول الله ﷺ فكيف بمن كان كارها قال يخسف بهم ولكن يبعث يوم القيامة على نيته