The president of Iran has much less power than a president or prime minister in a democratic country.
The real power in Iran is with the theocratic Assembly of Experts. These are former religious leaders and elected parliament members with long political careers. They appoint the Supreme Leader and the Guardians Council. The Supreme Leader is in charge of the military and judges. The Guardians Council are experts in Sharia Law and are in charge of the actions by the judiciary. The judiciary appoints the Expediency Discernment Council which approves elected candidates before elections and potential new laws or other actions made by the parliament or president.
The Revolutionary Guard protects the president and the Supreme Leader is in charge of them.
The president can make diktats if they are approved and offer policies to the parliament to vote. He is also the diplomatic leader of the country.
Iran doesn't have departments. "Departments" are tasks of the Congress in the US handed over to the executive for expediency. Iran has its functions of government separated into units, called ministries, similarly. This is constitutional in Iran also.
The main ministries are controlled by Supreme Leader most directly: Judiciary, Interior (more like an elections board) and Intelligence.
The following are ministries appointed by the president:
Minister of Agricultural Jihad
Minister of Commerce
Minister of Communication and Information Technology (there are HUGE restrictions, though)
Minister of Cooperatives
Minister of Culture and Islamic Guidance
Minister of Defense and Logistics
Minister of Economy and Finance Affairs
Minister of Education
Minister of Energy
Minister of Foreign Affairs
Minister of Health and Medical Education
Minister of Housing and Urban Development
Minister of Industries and Mines Supervisor
Minister of Labour and Social Affairs
Minister of Petroleum Supervision
Minister of Roads and Transportation
Minister of Science, Research, and Technology
Minister of Welfare and Social Security
(Most about the list and above you can read, plus Vice president ministries, also appointed by the president on the Wikipedia Iran page)