Ubada bin Samit reported,

The Messenger of Allah ﷺ, surrounded by a group of his companions, said, "Pledge allegiance to me that you will not associate anything with Allah, that you will not steal, that you will not commit adultery, that you will not kill your children, that you will not bring forth any slander you have fabricated between your hands and feet, and that you will not disobey me in what is right. Whoever fulfills this, his reward is with Allah. Whoever commits any of these and is punished for it, that punishment is an expiation for him. And whoever commits any of these and Allah conceals it, his affair rests with Allah. If He wills, He pardons him, and if He wills, He punishes him."Ahmad bin Saeed differed with him in this narration.

Nasai 4166

Sahih

أخبرنا عبيد الله بن سعد بن إبراهيم بن سعد قال حدثني عمي قال حدثنا أبي عن صالح عن ابن شهاب قال حدثني أبو إدريس الخولاني أن

عبادة بن الصامت قال

إن رسول الله ﷺ قال وحوله عصابة من أصحابه تبايعوني على أن لا تشركوا بالله شيئا ولا تسرقوا ولا تزنوا ولا تقتلوا أولادكم ولا تأتوا ببهتان تفترونه بين أيديكم وأرجلكم ولا تعصوني في معروف فمن وفى فأجره على الله ومن أصاب منكم شيئا فعوقب به فهو له كفارة ومن أصاب من ذلك شيئا ثم ستره الله فأمره إلى الله إن شاء عفا عنه وإن شاء عاقبه خالفه أحمد بن سعيد

النسائي 4166صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Pledge of allegiance
Chapter
Pledge of allegiance to jihad
Numbering
Darussalam 4166
Nasai 4166