Asked “What use will the existence of Hazrat Mahdi (as) during the time of his occultation be?” Rasulallah (saas) replied “I swear to Allah Who sent me as His prophet that during the time of his occultation they will benefit from him as they benefit from the Sun when it is behind a cloud.”
(Bihar al-Anwar, Vol. 52, p. 93)
The hadith indicates that Hazrat Mahdi (as) will continue working even during the time of his occultation. There will be strong pressure on Hazrat Mahdi (as) from unbelievers because of his preaching the moral values of Islam and successful activities. For that reason, Hazrat Mahdi (as) will at times be imprisoned or else be concealed from public gaze. Our Prophet (saas) has revealed that during these times Hazrat Mahdi (as) will continue to strengthen people’s faith and tell them of the existence of Allah.