Anas bin Malik reported,

The Messenger of Allah ﷺ said, "I have been commanded to fight the people until they say, 'There is no god but Allah.' When they say it, pray our prayer, face our qiblah, and slaughter as we slaughter, then their blood and property become inviolable to us except by right, and their reckoning is with Allah."

Azami 7863

Sahih

عن أنس بن مالك قال

قال رسول الله ﷺ: أمرت أن أقاتل الناس حتى يقولوا: لا إله إلا الله، فإذا قالوها، وصلوا صلاتنا، واستقبلوا قبلتنا، وذبحوا ذبيحتنا فقد حرمت علينا دماؤهم وأموالهم إلا بحقها، وحسابهم على الله.

الأعظمي 7863صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Command to fight the warring enemies until they say, "There is no god but Allah"
Numbering
Jami al-Kamil 7863 (2nd edition)
Azami 7863