Relations between the neighbors have long been strained, with Azerbaijan being a close ally of Iran's historical rival Turkey and holding close ties with arch-foe Israel. The arrests came after months of diplomatic tensions.
It accused them of being “engaged in a pro-Iranian propaganda of religious radicalism, fulfilling orders from abroad to undermine Azerbaijan's tradition of tolerance.”
According to Azerbaijan, they promoted “radical Islam” using money from drug profits.
In January, Azerbaijan suspended the operation of its embassy in Iran, days after a gunman stormed the mission, killing one guard and wounding two others. Baku has claimed that Tehran’s secret services were behind the attack.
On Thursday, Azerbaijan's Ministry of Foreign Affairs announced four Iranian diplomats as persona non grata and demanded their immediate departure from the country within 48 hours.
The decision was conveyed to the Iranian Ambassador to Azerbaijan, Abbas Mousavi, during his meeting with the Azerbaijani Foreign Ministry. In a statement, the Azerbaijani Foreign Ministry said the diplomats were involved in activities that violated their diplomatic status and the Vienna Convention on Diplomatic Relations of 1961.
https://shafaq.com/en/World/Azerbaijan-declares-four-Iranian-diplomats-as-persona-non-grata
From February 2008, the first time that they were exposed in Azerbaijan to an attempt to carry out an attack against the Israeli Embassy in Azerbaijan, the Iranians acted together with other nationalities, normally Lebanese, and, in many other cases, like in Cyprus, they recruited Lebanese that are residing outside of Iran and Lebanon carrying passports such as Swedish, Turkish and Pakistani. In that case, they have what we call a kind of a “deniability,” the capability to say “this is not our people.”
If you look back over the last 20 years, you’ll see that they normally recruit Shiites Muslims that have double identities.
https://www.ekathimerini.com/opinion/interviews/1208142/former-top-mossad-agent-on-the-modus-operandi-of-irans-intelligence/