Q. Is it necessary to take permission from a female in the presence of witnesses to get her married in the Masjid?
A. There are two instances wherein witnesses to a marriage are present:
Prior to the Nikah, a Mahram/unmarriageable kin (father, brother etc.) takes consent from the bride to get her married to the groom in the Masjid. In this case, taking consent from the bride in the presence of two Muslim male witnesses or one male witness and two female witnesses is not necessary, although it is better to do so.
However, at the time of the Nikah, in the Masjid, the presence of two Muslim male witnesses or one male witness and two female witnesses is necessary. In this instance, the absence of the required witnesses would render the marriage invalid. (Fataawa Raheemiyyah 8/147)
Allah Ta’ala Knows Best
Mufti Ismaeel Bassa