A US appeals court on Thursday rejected the Trump administration's effort to temporarily bar most refugees from entering the country, ruling that those who have relationships with a resettlement agency should be exempt from an executive order banning refugees.