Not to quibble, but almost everything a spy does is illegal. Thats one of several reasons you maintain a spy agency, to do things that are illegal. You give them fake names, fake ID, fake jobs, and you whisk them in and out as you need to.
If they get caught, they may have to do some time, or you may just have to pay a judge and get them off. Or remind the judge that you've got those photos he doesn't want published, and away you go.
If its legal, you have your diplomats do it. If its illegal, you have those other guys do it.
Thank you for injecting some rational and realistic thought into this thread.
I am curious, though, if the warrant specified the names of the agents and if so, how did the names were discovered.