In a ceremony broadcast live on state TV, Mr Zarif signed two agreements to expand cooperation between Iran and Armenia.
Zarif, a US-educated veteran diplomat, helped craft a pact with world powers in 2015 that curbed Iran's nuclear programme in return for sanctions relief.
Zarif announced his resignation on Instagram on Tuesday without a clear reason. The Trump administration pulled the United States out of the deal in May a year ago and reinstated severe sanctions while claiming the pact isn't strict enough. The president's praise was "a clear sign of the satisfaction of the representative of the people of Iran about the wise and effective positions and work of Dr Zarif", Vaezi wrote on Instagram. There was no immediate response from the 59-year-old diplomat.
Soulemani, who oversees Iran's military involvement in Syria, commented on Zarif's absence from the Monday meeting saying "Some inconsistencies in the presidential office that have been raised have led to the absence of our country's foreign minister at this meeting".
The foreign minister is "supported and approved by the system's top authorities, from the supreme leader down", he added.
Rouhani and Zarif, who are considered relative moderates, have been facing pressure from Iranian hardliners as the deal they championed has unraveled.
In another show of confidence, senior Revolutionary Guards commander Qassem Soleimani said Zarif was the main person in charge of Iranian foreign policy and he was supported by the Supreme Leader, Ayatollah Ali Khamenei.
Over the last two days, India and Pakistan have ordered air strikes against one another, the first time in history that two nuclear-armed powers have done so, while ground forces have exchanged fire in more than a dozen locations. Trump pulled the US out of the accord and reimposed sanctions, leaving Iran to try and salvage what it could of the agreement.
On Tuesday, Israeli Prime Minister Benjamin Netanyahu, long a critic of Iran, welcomed his departure.
Divisions have also been apparent on other matters such as the future of the nuclear program abandoned by the U.S. Rouhani's government has said the country needs to abide by the accord despite U.S. sanctions.