In a letter to Mr Zarif reported by the state-linked Irna news agency, Mr Rouhani said that he was aware of the pressures placed on the country's diplomats but that he saw the foreign minister as an integral part of the state.
Zarif "is indeed in charge of the Islamic Republic of Iran's foreign policy", Soleimani said in comments carried by the Guards' official website Sepah News.
"The absence of Zarif was the result of a bureaucratic error", said Qassem Soleimani, commander of the Quds Force in Iran's Revolutionary Guards.
Rouhani's chief of staff Mahmoud Vaezi said Rouhani stood by Zarif.
But he also faced criticism by various anti-Western factions in Iran past year, when the US pulled out of the 2015 US-Iran Joint Comprehensive Plan of Action (JCPOA) and reinstated sanctions on the country.
Zarif's resignation came abruptly, creating a shock among Iranians.
The third scenario highlighted by Fararu envisioned Zarif's resignation as a tactical move to pressure hard-line rivals hounding him since the nuclear deal, which has failed to deliver the kind of economic benefits that Iranians had hoped for.
It remains unclear what sparked Zarif's resignation. The major countries in the European Union - Germany, France and the United Kingdom - have reiterated that Iran has complied with the regulations of the nuclear deal and have created a new financial "special objective vehicle" to facilitate trade with Iran despite the US sanctions. But allies said the last two days' events would give him political ammunition against hardliners.
And although that report cites the foreign minister's supporters as saying that the incident would leave Zarif with more leverage in competition with hardliners, it is equally possible that the schism was never genuine in the first place.
Rouhani's letter similarly name-checked Khamenei, who is the ultimate authority in virtually all affairs under Iran's theocratic system.
"I thank the Iranian nation and officials".
- United and City looking to create El Classico in Manchester
- Defoe strengthens Euros case
- Best ways to make your website stand out from the rest
- Jordyn Woods apologises to Khloe Kardashian in Red Table Talk
- Pompeo: North Korea not clear on scope of closing Yongbyon nuclear facility
- TMZ: Luke Perry has massive stroke shortly after 90210 series announcement
- Labour party leader, under pressure, backs a new Brexit referendum
- Bryce Harper signs 13-year deal with Philadelphia Phillies
- Lady Gaga on Rumored Romance with Bradley Cooper: 'Fooled Ya'
- Parents Warned About 'Suicidal' Videos on YouTube Kids