Moreover, the righteous are indeed granted karāmāt (honorific miracles), just as the upright believers of this community have been granted them, and just as the disciples of Jesus and others who followed his religion were granted them. Yet the appearance of karāmāt at the hands of the righteous does not mean that they are infallible like the prophets.
A person may be upright, a walī (close friend of Allah), and enjoy karāmāt, while still falling into error—whether in what he thinks, in what he hears and then relates, in what he sees, or in what he understands from written works. For this reason, the words of everyone other than the prophets are accepted or rejected, unlike the prophets—may Allah’s blessings be upon them all—for it is obligatory to affirm as true everything they report about the unseen and to obey them in everything they command. Hence Allah has made faith in what they were given mandatory, whereas He has not required belief in everything that anyone else may bring.
Allah the Exalted says:
“Say, ‘We believe in Allah, in what has been sent down to us, in what was sent down to Abraham, Ishmael, Isaac, Jacob and the Tribes, and in what was given to Moses and Jesus and the prophets from their Lord. We make no distinction between any of them, and to Him we submit.’” [al-Baqarah: 136]
He also says:
“Righteousness is not that you turn your faces toward the east or the west; rather, righteousness is to have faith in Allah, the Last Day, the angels, the Book, and the prophets.” [al-Baqarah: 177]
Consequently, the Muslims are unanimously agreed that whoever denies a prophet whose prophethood is definitively established is a disbeliever and an apostate, and that whoever reviles a prophet must be put to death. Indeed, it is obligatory to believe in everything that the prophets were given.