Allah has mentioned in the Qur’an that He sent messengers and guides among all people. We Muslims believe in all Allah’s prophets and messengers who came before Prophet Muhammad (peace and blessings be upon him), who was the final prophet and messenger of Allah.
Sheikh Hasanin Makhluf, the late former Grand Mufti of Egypt (may Allah bless his soul) stated the following: It is obligatory upon Muslims to believe in general in all Allah’s messengers who are generally mentioned in religion, and in detail in those mentioned in detail therein. The Qur’an makes mention, in detail, of 25 messengers.
The eminent scholar Al-Bajuri said in Hawashi Jawharat At-Tawhid —Believing in Allah’s messengers and prophets in detail does not mean learning their names by heart. Rather, it means that when one of them is made mention of, one is not to deny his messengerhood or prophethood. One who denies the messengerhood or prophethood of one of Allah’s messengers or prophets (who are mentioned by name in the Qur’an) would be a disbeliever. But this judgment would not apply to the lay person who is ignorant of Allah’s messengers and prophets, unless he or she denies this after having been taught about them.
The eminent scholar Al-Amir also said — There is a kind of ignorance here that undermines the bases of belief like ignoring the prophethood of Muhammad (peace and blessings be upon him). But ignoring, for example, the prophethood of Elisha does not affect one’s faith, for most common people do not know his name, let alone his message. Hence, should one deny the prophethood or messengerhood of a certain prophet or messenger on the basis of one’s ignorance of them, one would not be judged as a disbeliever. One may be judged as such only when one denies this after having been taught about them as prophets and messengers.