Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:24:62

The believers are only those who believe in Allah and His Messenger and, when they are ˹meeting˺ with him for a matter of common interest, do not depart until they have asked his permission. Indeed, those who ask your permission, ˹O Muhammad˺ - those are the ones who believe in Allah and His Messenger. So when they ask your permission for something of their affairs, then give permission to whom you will among them and ask forgiveness for them of Allah. Indeed, Allah is Forgiving and Merciful.  

Only they are believers who believe in God and His Messenger and who, when they are with him, namely, the Messenger, in a collective affair, such as ˹during˺ the Friday sermon, do not leave, when they have an excuse, until they have asked leave of him. Truly those who ask leave of you — it is they who believe in God and His Messenger. So when they ask leave of you for some affair, ˹some˺ matter, of theirs, give permission to whom you will of them, to leave, and ask God to forgive them. Truly God is Forgiving, Merciful.
القرآن:٢٤:٦٢

إِنَّمَا الْمُؤْمِنُونَ الَّذِينَ آمَنُوا بِاللَّهِ وَرَسُولِهِ وَإِذَا كَانُوا مَعَهُ عَلَىٰ أَمْرٍ جَامِعٍ لَمْ يَذْهَبُوا حَتَّىٰ يَسْتَأْذِنُوهُ ۚ إِنَّ الَّذِينَ يَسْتَأْذِنُونَكَ أُولَٰئِكَ الَّذِينَ يُؤْمِنُونَ بِاللَّهِ وَرَسُولِهِ ۚ فَإِذَا اسْتَأْذَنُوكَ لِبَعْضِ شَأْنِهِمْ فَأْذَنْ لِمَنْ شِئْتَ مِنْهُمْ وَاسْتَغْفِرْ لَهُمُ اللَّهَ ۚ إِنَّ اللَّهَ غَفُورٌ رَحِيمٌ  

{إنما المؤمنون الذين آمنوا بالله ورسوله وإذا كانوا معه} أي الرسول {على أمر جامع} كخطبة الجمعة {لم يذهبوا} لعروض عذر لهم {حتى يستأذنوه إن الذين يستأذنونك أولئك الذين يؤمنون بالله ورسوله فإذا استأذنوك لبعض شأنهم} أمرهم {فأذن لمن شئت منهم} بالانصراف {واستغفر لهم الله إن الله غفور رحيم}.