Some people offer Tahiyyat-ul-Masjid (two-unit Prayer to salute the mosque) even at the times when it is prohibited to offer supererogatory Salah (Prayer) or make up for Sunnah Salah of Fajr (Dawn) immediately after Fajr Prayer.
Is this permissible?
when a person enters the Masjid at a time when it is prohibited to offer supererogatory Salah, they should offer Tahiyyat-ul-Masjid before sitting. This is based on the general command of the Prophet (peace be upon him):
When anyone of you enters the Masjid, they should not sit until they offer two Rak`ahs.
in regard to the two supererogatory Rak`ahs (units of Prayer) before Fajr Prayer, if missed before Fajr Prayer, a worshiper may offer them after it.
according to his Sanad (chain of narrators), related on the authority of
Qays ibn `Amr that he said:
The Messenger of Allah (peace be upon him) saw a man praying two Rak`ahs after Fajr Prayer was over. The Messenger of Allah (peace be upon him) said, 'Fajr Prayer consists of two Rak`ahs.' The man replied, 'I did not pray the two Rak`ahs before Fajr Prayer, so I offered them now.' The Messenger of Allah (peace be upon him) remained silent.
This indicates that if a person misses the two-unit supererogatory Salah performed before (Part No. 7; Page No. 241) Fajr Prayer, they may offer it after Fajr Prayer, though it would be better to offer it after the sun has risen high in the sky, because the Messenger of Allah (peace be upon him) said:
Anyone who misses the two (supererogatory) Rak`ahs of Fajr may offer them after the sun rises.
(Related by Al-Tirmidhy, Ibn Hibban in his Sahih, and Al-Hakim in his Mustadrak and he commented:
"It is a Sahih Hadith in accordance with the transmission conditions of Al-Bukhari and Muslim, but they did not narrate it." This Hadith was also related by
Al-Bayhaqy in the Sunan [Hadith compilations classified by jurisprudential themes])May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.