Facing a hostile Congress, the US president is likely to focus on foreign policy to secure his legacy.