All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad, sallallaahu 'alayhi wa sallam, is His slave and Messenger.
It is known that shaving the beard is prohibited and letting it grow is obligatory because the Prophet said: “Trim closely the mustache and let the beard grow.” [Al-Bukhari and Muslim] Ibn Hazm said: “They (scholars) agreed that shaving the entire beard is disfigurement and is not allowed.” [End of Quote] We have previously underlined this in several Fatwas. Prohibitions are deemed permissible only in case of necessity because Allah, The Almighty, Says (what means): {… while He has explained in detail to you what He has forbidden you, excepting that to which you are compelled} [Quran 6:119] Scholars have clarified the limit of such necessity, whereby what is unlawful becomes permitted. It is stated in Nathariyyat Adh-Dharoorah Ash-Shar‘iyyah that: “The necessity is when a human being faces a situation of danger or severe hardship insofar as he fears harm or damage to his life, body part, honor, mind or property or anything related to these things. In such a case, it becomes obligatory (or permissible, depending on the situation) to commit what is forbidden or abandon a religious obligation or delay it beyond its due time, as a way of warding off harm which one most likely believes will happen. This is with the condition that he does so (commit what is forbidden or abandon an obligation) according to the restrictions of Islamic law.” [End of Quote]
This limit of necessity does not apply to the situation of the engineer in reference, as long as he can find another job – even if it is outside his area of specialty – because there is no necessity that entails permitting him to shave his beard. Working in one’s area of specialty is not imperative in the Sharee‘ah, nor is it a necessity that entails permitting him to commit a prohibited act. Therefore, it is impermissible for him to shave his beard as long as he can find a permissible job, even if it is not within his area of specialty.
For more benefit on keeping the beard, please refer to Fataawa 332320, 317029, 119302, and 91108.
Allah knows best.