بسم الله الواحد القهار
[My father dictated to us saying] narrated to us Mohammad Ibn Mohammad who said: narrated to us Abu Ghalib Ahmad Ibn Mohammad Az-Zurari who said: narrated to us my uncle Ali Ibn Sulayman who said: narrated to us Mohammad Ibn Khalid At-Tiyalesi who said: narrated to me Al-Alaa Ibn Razin from Mohammad Ibn Muslim Ath-Thaqafi who said:"I heard Aba Ja'far Mohammad Ibn Ali(عليهما السلام) saying: ‘Whoever obeys, considering it a matter of his religion, someone who disobeys Allah, has no religion, and so also is a person who follows what is forged against Allah as well as someone who accepts as a matter of his religion, to reject any of the signs of Allah.’"
Footnote: this narration has also been narrated in Al-Kafi (Vol. 2 Pg. 373) through a Sahih(authentic) chain and Al-Allamah Al-Majlisi says: "'has no religion' means that he has no belief or his worship is not accepted and 'Whoever obeys' means that whoever worships Allah through 'obeying one who disobeys Allah' which refers to obeying fallible human beings, so it is not allowed to obey other than the infallibles in all matters, it has also been said that he who disobeys Allah could be also someone whose verdict is disobedience (to Allah) and is not worthy of issuing Fatwa, the second 'Whoever obeys' means also believing and worshipping Allah through 'what is forged against Allah' means that he makes this forged act as an act of worship or bases his worship upon that fabricated act. 'to reject any of the signs of Allah' means that he rejects any of the decisive verses of Qur'an, and it is also possible that 'the signs' here refer to the Imams(عليهم السلام)."
Source: Amali of At-Tusi, Pg. 130-131