The rejection was a rare setback for the president's administration at the high court, which has often backed his assertions of presidential authority.