Abul Qassem Ubaidullah bin Hasan bin Mohammad Al-Sokouni narrated from Hasan bin Mohammad Al-Bejelli, from Ahmad bin Yahya bin HUSAIN (ASWS) bin Zaid bin ALI, from his father, from his grandfather, HUSAIN (ASWS) bin Zaid, who said:
IMAM JAAFAR BIN MOHAMMAD (ASWS) said, “My father told me that his father narrated, from HUSAIN BIN ALI (ASWS) , from his father, the COMMANDER OF THE BELIEVERS (ASWS), who said:
“ALLAH (SWT)’s curse is on those who do not say that I am the fourth of the four caliph.”
So Husain bin Zaid said TO JAAFAR BIN MOHAMMED (ASWS), “But you say that he is the first caliph of the PROPHET (SAWW), and you do not lie.”
JAAFAR BIN MOHAMMAD (ASWS) replied:
Yes. ALLAH (SWT) says in the Qur'an, “When Your Lord said to the angels: Verily I am going to appoint a caliph in the earth" (2:30). So Adam was the first cALIph.
And ALLAH (SWT) says in the Quran. " O Dawud! Verily we have appointed you as a caliph in the earth" (38:26).
So Dawud was the second caliph.
And ALLAH (SWT) says in the Quran. "Musa said to Harun, take my place (be my caliph) among my people, act rightly" (7:142).So
Harun was the third caliph.
And ALI (ASWS) is the caliph of Mohammad. That is why ALI (ASWS) said that ALLAH (SWT)'s curse is on those who did not say that he is the fourth of the four caliph.
(Ref : Bihar Volume 38 Page 153 hadees 127)