The unusual legislation bars anyone from entering the U.S. as a U.N. representative if they’ve engaged in espionage or terrorist activity and still pose a threat to U.S. security. It’s aimed at blocking Hamid Aboutalebi (ah-boo-TAH’-lah-bee). He’s linked to the 1979 takeover of the U.S. Embassy in Tehran.

Obama says he shares lawmakers’ concern that terrorists could use diplomatic cover to enter the U.S. But he says he will treat the legislation as advisory out of concern it could interfere with his discretion to receive ambassadors.

The White House has said Aboutalebi was an unacceptable choice. The administration has refused to grant him a visa.