We study analytic properties of harmonic maps from Riemannian polyhedra into CAT(κ) spaces for κ∈{0,1}. Locally, on each top-dimensional face of the domain, this amounts to studying harmonic maps from smooth domains into CAT(κ) spaces. We compute a target variation formula that captures the curvature bound in the target, and use it to prove an Lp Liouville-type theorem for harmonic maps from admissible polyhedra into convex CAT(κ) spaces. Another consequence we derive from the target variation formula is the Eells–Sampson Bochner formula for CAT(1) targets.