Allah the Exalted said:
٢٨١ - باب النهي عن تناجي اثنين دون الثالث بغير إذنه إلا لحاجة وهو أن يتحدثا سرا بحيث لا يسمعهما وفي معناه ما إذا تحدثا بلسان لا يفهمه
Allah the Exalted said:
Private conversation is only from Satan that he may grieve those who have believed,1 but he will not harm them at all except by permission of Allāh. And upon Allāh let the believers rely.
It is related from Ibn ʿUmar (may Allah be pleased with them both) that the Messenger of Allah ﷺ said: "When you are three, two of you should not converse privately to the exclusion of the third." Agreed upon. Abū Dāwūd also reported it and added: Abū Ṣāliḥ said: I said to Ibn ʿUmar, "And what of four?" He said, "It will not harm you." Mālik also reported it in *al-Muwaṭṭaʾ*, from ʿAbd Allāh ibn Dīnār, who said: I and Ibn ʿUmar were by the house of Khālid ibn ʿUqbah, which is in the market, when a man came wishing to speak privately with him, and there was no one with Ibn ʿUmar but me. So Ibn ʿUmar called another man until we were four, and then he said to me and to the third man whom he had called, "Draw back a little, you two, for I heard the Messenger of Allah ﷺ saying: 'Two should not converse privately to the exclusion of one.'"
It is related from Ibn Masʿūd (may Allah be pleased with him) that the Messenger of Allah ﷺ said: "When you are three, two of you should not converse privately to the exclusion of the other until you mix with other people, because that would sadden him." Agreed upon.