It's never been clear to me how effective IAEA can be at keeping out state spies from their midst if the world's best intel agencies want "in".

Going back pre-Iraq-war, back when there were "inspections" and "sanctions" on Iraq, you can dig up "page 19" articles in NYTimes where -- if I recall correctly -- the US was caught putting spy equipment on the IAEA monitoring equipment in Iraq. This is (according to Iraq) what in large part triggered Iraq to kick out US inspectors. Then the Iraq (2) war started because they wouldn't let in inspectors.

Iran's theory, glossed over at the time but also reported in the rare western press articles was that the US intentionally got caught. (So that the Saddam would have explicit pressure to get the US kicked out, so that then they (US/Israel) could have a pretext to take out Iraq.) I don't know if Iran had any actual evidence to that effect or it was a bit of a conspiracy theory; I never actually read Iranian news sources whcih might have had details (or might have revealed just empty posturing.)