Ubada bin Samit reported,

We were sitting with the Prophet ﷺ in a gathering when he said, "Pledge allegiance to me that you will not associate anything with Allah, that you will not steal, and that you will not commit fornication."Then he recited the verse to them. "Whoever among you fulfills this, "his reward is with Allah" [Mumtahanah 60:12]. Whoever commits any of these offenses and Allah conceals it for him, his affair rests with Allah عز وجل. If He wills, He will punish him, and if He wills, He will forgive him."

Nasai 4215

Sahih

أخبرنا قتيبة قال حدثنا سفيان عن الزهري عن أبي إدريس الخولاني

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

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

النسائي 4215صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Pledge of allegiance
Chapter
Reward of one who fulfills that upon which he pledged allegiance
Numbering
Darussalam 4215
Nasai 4215