If a boy is informed that he will not be admitted to a school unless he shaves his beard, is he allowed to do so?
It is not permissible for a male adult to shave his beard based on obligatory precaution, unless there is a serious necessity or if keeping a beard entails unbearable hardship. As for the case in question, the boy can apply to a different school or explain to them that it is a religious requirement to keep a beard. It is worth noting that one does not have to keep a long beard, rather it can be short as long as it is considered a beard by the common view (urf).