The Messenger of Allah ﷺ said, "I have been commanded to fight the people until they say, 'There is no god but Allah.' Once they say it, their blood and wealth are protected from me, except by its rightful claim, and their reckoning is with Allah ."
حدثنا أبو بكر بن أبي شيبة حدثنا أبو معاوية وحفص بن غياث عن الأعمش عن أبي صالح
قال رسول الله ﷺ أمرت أن أقاتل الناس حتى يقولوا لا إله إلا الله فإذا قالوها عصموا مني دماءهم وأموالهم إلا بحقها وحسابهم على الله عز وجل
Recorded by Muslim in the Book of Faith, chapter on the command to fight people until they say there is no god but Allah, Muhammad... etc, hadith no. 35/21, from Ibn Abu Shayba, through the same chain.