Praise be to Allah.
Wearing niqaab is one of the things that are forbidden when in ihraam. A woman can cover her face in front of non-mahram men after entering ihraam with part of her garment, lowering it from the top of her head over her face, without committing the forbidden action of wearing niqaab.
It was narrated that ‘Abd-Allaah ibn ‘Umar (may Allaah be pleased with him) said: A man stood up and said: “O Messenger of Allaah, what clothes do you command us to wear in ihraam?” The Prophet (peace and blessings of Allaah be upon him) said: “Do not wear shirts, pants or any kind of headgear… and women in ihraam should not wear niqaab or gloves.” Narrated by al-Bukhaari, 1741.
Ibn Qudaamah said:
Ibn al-Mundhir said: The fact that wearing the burqa’ (face veil – during ihraam) is makrooh is narrated from Sa’d, Ibn ‘Umar, Ibn ‘Abbaas and ‘Aa’ishah. We do not know of anyone who held a different view. Al-Bukhaari and others narrated that the Prophet (peace and blessings of Allaah be upon him) said: “A woman should not wear niqaab or gloves.” But if she needs to cover her face because men are passing close by her, then she should lower part of her garment from the top of her head over her face. This was narrated from ‘Uthmaan and ‘Aa’ishah, and this was the view of ‘Ata’, Maalik, al-Thawri, al-Shaafa’i, Ishaaq and Muhammad ibn al-Hasan, and we do not know of any opposing view. This is because of the report narrated from ‘Aa’ishah (may Allaah be pleased with her) who said: “The riders used to pass by us when we were in ihraam with the Messenger of Allaah (peace and blessings of Allaah be upon him). When they drew near, one of us would lower her jilbaab from her head over her face, and when they had passed by we would uncover our faces.” Narrated by Abu Dawood, 1833 and by al-Athram. Al-Mughni, 3/154. The hadeeth of ‘Aa’ishah was classed as saheeh by al-Albaani in Risaalat Jilbaab al-Mra’ah.
Doing an action that is forbidden in ihraam deliberately for a valid reason requires offering a fidyah (ransom), which is fasting for three days, or feeding six poor persons among the poor of the sanctuary, or slaughtering a sheep in the sanctuary. But there is no sin involved because there is a valid reason or excuse for doing that forbidden action. It seems that this is the case in your situation, because you say that you needed to wear niqaab because there were a lot of men, So you have to offer the fidyah as mentioned above, and there is no sin on you. This is because you specifically mention niqaab in your question, and not covering the face with some other kind of garment. But if what happened is that you covered your face with something other than niqaab, or in a manner in which it is not usually worn, then you do not have to do anything and you will be rewarded, in sha Allaah, for your keenness to cover yourself and keep away from the gaze of men.
Shaykh Ibn ‘Uthaymeen said:
If a person in ihraam does any of the things that are forbidden, such as having intercourse, killing game, etc, then one of the following three scenarios must apply:
1 – He forgot or was unaware of the ruling, or he was forced or he was asleep. In that case he does not have to do anything. There is no sin on him and he does not have to offer the fidyah, and his pilgrimage is still valid, because Allaah says (interpretation of the meaning):
“Our Lord! Punish us not if we forget or fall into error, our Lord! Lay not on us a burden like that which You did lay on those before us (Jews and Christians); our Lord! Put not on us a burden greater than we have strength to bear. Pardon us and grant us forgiveness. Have mercy on us. You are our Mawlaa (Patron, Supporter and Protector) and give us victory over the disbelieving people”
“And there is no sin on you concerning that in which you made a mistake, except in regard to what your hearts deliberately intend. And Allaah is Ever Oft‑Forgiving, Most Merciful”
2 – He did the forbidden action deliberately but for a valid reason that makes it permissible. In that case he has to do what is required in the event of committing a forbidden action (i.e., offer the fidyah) but there is no sin on him, because Allaah says (interpretation of the meaning):
“And perform properly (i.e. all the ceremonies according to the ways of Prophet Muhammad), the Hajj and ‘Umrah (i.e. the pilgrimage to Makkah) for Allaah. But if you are prevented (from completing them), sacrifice a Hady (animal, i.e. a sheep, a cow, or a camel) such as you can afford, and do not shave your heads until the Hady reaches the place of sacrifice. And whosoever of you is ill or has an ailment in his scalp (necessitating shaving), he must pay a Fidyah (ransom) of either observing Sawm (fasts) (three days) or giving Sadaqah (charity — feeding six poor persons) or offering sacrifice (one sheep)”
3 – He did the forbidden action deliberately but with no valid reason that makes it permissible. In this case he has to do what is required in the event of committing a forbidden action (i.e., offer the fidyah) and there is sin on him.
(Manaasik al-Hajj wa’l-‘Umrah, Ch. 5, Mahdhooraat al-Ihraam).
And Allaah knows best.