The Messenger of Allah ﷺ came to us while we were in a tent inside the mosque of Medina and said in it, "It has been revealed to me that I should fight the people until they say, 'There is no god but Allah,'" or something similar.
قال عبيد الله حدثنا إسرائيل عن سماك عن النعمان بن سالم
دخل علينا رسول الله ﷺ ونحن في قبة في مسجد المدينة وقال فيه إنه أوحي إلي أن أقاتل الناس حتى يقولوا لا إله إلا الله نحوه
Its chain of transmission is sahih. Ibn Majah narrated it in the Book of Fitan, chapter on refraining from harming one who says "There is no god but Allah," hadith no. 3929, from the hadith of Numan bin Salim, through him. It is also in Kubra, hadith no. 3442, and Busiri graded it sahih. The man is Aws .