It's the latest example of the president siding with foreign adversaries over his own intelligence agencies.