It doesn't say spying on other countries is against international law, it says spying on the UN is. The Convention on the Privileges and Immunities of the United Nations[1] says "UN premises shall be inviolable, and UN property shall be immune from search, requisition, confiscation etc."