Thank you for your question. The relationship Imam Ali (as) had with the first three Caliphs was cordial, but that doesn’t mean that he condoned their usurping the Caliphate. Rather, the Imam (as) was careful not to sow the seeds of discord in the Muslim Community and after the people had decided not to follow the advice of the Prophet (saw), he worked for Islam within the parameters of the situation he faced. The Shia disapprove of the actions of first three Caliphs as they went against what they consider the express guidance of the Prophet (saw).
May you always be successful.