Syrian state media SANA said the attack on Saturday took place in the Mazzeh neighbourhood. It said "Israeli aggression" targeted the building.
A well-informed source told Al Jazeera the target was an IRGC intelligence unit, adding that a senior IRGC intelligence official in Syria and his assistants were in the building.
In a brief statement, the IRGC said an air strike by Israeli fighter jets killed "a number of Syrian forces and four military advisers". It later identified the people killed as Hojjatollah Omidvar, Ali Aghazadeh, Hossein Mohammadi and Saied Karimi, without sharing their ranks.
Iranian state television called it a "terrorist" attack by Israel, which has yet to comment.
The attack, which is believed to have been carried out with at least four missiles, completely destroyed a four-storey building, according to Iranian state media. At least one person was taken to hospital.
Saturday's strike comes amid widening tensions in the region and the Israeli offensive on Gaza that has killed nearly 25,000 people.
Israel has carried out hundreds of strikes on Iran-linked targets inside government-controlled parts of war-torn Syria in recent years.
"Syria is not only a battleground of the power struggle between the regional and the global powers, but also is a ground for the intelligence wars as well," said Al Jazeera's Resul Serdar, reporting from Tehran.
"For Iran, Lebanon and particularly for Hezbollah, Syria is a crucial element in the so-called 'Axis of the Resistance', so that's why all their presence in Syria is kept secret," he added.
Last month, an Israeli air attack on a suburb of Damascus killed Iranian general Sayyed Razi Mousavi, a longtime IRGC adviser in Syria.
Israel rarely acknowledges its actions in Syria, but it has said that it targets bases of Iran-allied groups, such as Lebanon's Hezbollah, which has sent thousands of fighters to support Syrian President Bashar al-Assad's forces.
Earlier this month, an attack said to be carried out by Israel killed top Hamas commander Saleh al-Arouri in Lebanon's capital, Beirut.
Comment: This comes amid a comment by the IDF chief that a 'war in Lebanon is becoming much more likely'.
Over the past weeks, rockets have been fired from Syria into northern Israel and the Israeli-occupied Golan Heights, adding to tensions along the Lebanon-Israel border and attacks on ships in the Red Sea by Yemen's Iran-aligned Houthi rebels.
Iran on Monday struck Erbil, the capital of Iraq's semi-autonomous Kurdistan region, with ballistic missiles in what it said was an attack on an Israeli spy headquarters, a claim denied by Iraqi and Iraqi Kurdish officials. At least four people were killed in the attack.
No honest decent person is going to miss this isreali apartheid regime when it's gone.