An executive agency can be acting within its delegated authority and still be acting unlawfully. An executive action can't violate the subject's* constitutional rights and the Administrative Procedure Act bars "arbitrary or capricious" actions.
Several courts have already found that the ban is likely arbitrary or capricious. In other words, the order appears to have been made on unreasonable grounds or without proper consideration.
*Some provisions apply to "citizen" while others, including the 14th amendment, apply to "all persons."
I think you're referring to Section 1 of the 14th amendment, which does not apply to "all persons", but only to citizens:
"All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the state wherein they reside. No state shall make or enforce any law which shall abridge the privileges or immunities of citizens of the United States; nor shall any state deprive any person of life, liberty, or property, without due process of law; nor deny to any person within its jurisdiction the equal protection of the laws."
People not within our borders that are not also citizens are not within the US's jurisdiction, and those are not afforded the same protection under the Constitution.
Several courts have already found that the ban is likely arbitrary or capricious. In other words, the order appears to have been made on unreasonable grounds or without proper consideration.
*Some provisions apply to "citizen" while others, including the 14th amendment, apply to "all persons."