What role did the FBI play in Riley's arrest?
The FBI arrests Nazi spies and saboteurs during WWII and Russian spied after WWII and those were supervised, directed, and controlled by organizations and governments outside the U.S.
The CIA is prohibited from actions inside the U.S., a prohibition which they ignore, but the FBI is not restricted from operating in foreign countries.
"Today, we have 63 legal attaché offices—commonly known as legats—and more than two dozen smaller sub-offices in key cities around the globe, providing coverage for more than 180 countries, territories, and islands. Each office is established through mutual agreement with the host country and is situated in the U.S. embassy or consulate in that nation.Our legal attaché program is managed by the International Operations Division at FBI Headquarters in Washington, D.C. This office keeps in close contact with other federal agencies, Interpol, foreign police and security officers in Washington, and national and international law enforcement associations. International liaison and information sharing are conducted in accordance with executive orders, laws, treaties, Attorney General Guidelines, FBI policies, and interagency agreements."
International Operations FBI