´It was narrated that Malik bin Al-Huwairith said:` "I heard the Messenger of Allah (ﷺ) say: 'When any one of you visits some people,he should not lead them in prayer."'
Related hadith on this topic
Explanation & Benefits
Hafiz Muhammad Ameen
788. Commentary: However, he may lead the prayer with the permission of the imam. This narration is concise. See Hadith number: 3.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 788
Shaykh Dr. Abdur Rahman Freywai
Commentary:
Note:
(The mentioned story of Malik bin Huwairith is not authentic; only the text of the hadith is authentic. Also, see: Tanaqudat al-Albani 481)
Source: Sunan al-Tirmidhi – Majlis ‘Ilmi Dar al-Da‘wah, New Delhi Edition, Page: 356
Shaykh Umar Farooq Saeedi
596. Commentary:
The fundamental ruling is indeed as stated, and its wisdom is clear: the local imam and congregants are well aware of each other's habits and circumstances, whereas a visitor is generally not, and this could cause difficulty for the congregants. However, if they desire it and the imam grants permission, then without doubt it is permissible.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 596