Abu Hurairah reported,

When the Prophet ﷺ passed away and Abu Bakr was appointed as his successor, some of the Arabs reverted to disbelief. Umar said, "Abu Bakr, how can you fight these people when the Messenger of Allah ﷺ said, 'I have been commanded to fight people until they say there is no god but Allah. Whoever says there is no god but Allah has secured from me his wealth and his life, except for what is due from them, and their reckoning is with Allah'?"

Bukhari 6924

Sahih

حدثنا يحيى بن بكير حدثنا الليث عن عقيل عن ابن شهاب أخبرني عبيد الله بن عبد الله بن عتبة أن

أبا هريرة قال

لما توفي النبي ﷺ واستخلف أبو بكر وكفر من كفر من العرب قال عمر يا أبا بكر كيف تقاتل الناس وقد قال رسول الله ﷺ أمرت أن أقاتل الناس حتى يقولوا لا إله إلا الله فمن قال لا إله إلا الله فقد عصم مني ماله ونفسه إلا بحقه وحسابه على الله

البخاري 6924صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Demanding repentance from apostates and obstinate disbelievers and fighting them
Chapter
Killing those who refuse to accept obligatory duties and what was attributed to apostasy
Numbering
Darussalam 6924
Bukhari 6924