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 adultery." He recited the verse to them. "Whoever among you fulfills this, his reward is with Allah. Whoever falls into any of these and Allah عز وجل conceals it for him, his affair is with Allah. If He wills, He will punish him, and if He wills, He will forgive him."

Nasai 5005

Sahih

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

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

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

النسائي 5005صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Faith and its laws
Chapter
Pledge of allegiance upon Islam
Numbering
Darussalam 5005
Nasai 5005