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 property are protected from me, except by its right, and their reckoning is with Allah."
حدثنا يزيد أخبرنا محمد عن أبي سلمة
قال رسول الله ﷺ أمرت أن أقاتل الناس حتى يقولوا لا إله إلا الله فإذا قالوها عصموا مني دماءهم وأموالهم إلا بحقها وحسابهم على الله
Its isnad is sahih. It has already appeared at number 9442.