Hadith on Bay’ah: Companions pledge their loyalty to Islam

‘Ubadah ibn al-Samit reported: I pledged allegiance to the Messenger of Allah, peace and blessings be upon him, along with a group of people. The Prophet said, “I take your pledge that you will not commit any idolatry with Allah, you will not steal, you will not commit adultery, you will not kill your children, you will not bring forth slander that you have fabricated, and you will not disobey me in good conduct. Whoever among you fulfills his pledge, his reward is with Allah. Whoever commits any of these, it will be taken from him in the world as his expiation and purification. Whoever has his crime concealed by Allah, then the matter belongs to Allah. If He wills, He will punish him, or if He wills, He will forgive him.

Source: Ṣaḥīḥ al-Bukhārī 7468

Grade: Sahih (authentic) according to Al-Bukhari

عَنْ ‌عُبَادَةَ بْنِ الصَّامِتِ قَالَ بَايَعْتُ رَسُولَ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ فِي رَهْطٍ فَقَالَ أُبَايِعُكُمْ عَلَى أَنْ لَا تُشْرِكُوا بِاللهِ شَيْئًا وَلَا تَسْرِقُوا وَلَا تَزْنُوا وَلَا تَقْتُلُوا أَوْلَادَكُمْ وَلَا تَأْتُوا بِبُهْتَانٍ تَفْتَرُونَهُ بَيْنَ أَيْدِيكُمْ وَأَرْجُلِكُمْ وَلَا تَعْصُونِي فِي مَعْرُوفٍ فَمَنْ وَفَّى مِنْكُمْ فَأَجْرُهُ عَلَى اللهِ وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا فَأُخِذَ بِهِ فِي الدُّنْيَا فَهُوَ لَهُ كَفَّارَةٌ وَطَهُورٌ وَمَنْ سَتَرَهُ اللهُ فَذَلِكَ إِلَى اللهِ إِنْ شَاءَ عَذَّبَهُ وَإِنْ شَاءَ غَفَرَ لَهُ

7468 صحيح البخاري كتاب التوحيد باب في المشيئة والإرادة