  We find an explicit solution of the source free Maxwell equations in a
generalized Kerr-NUT-(A)dS spacetime in all dimensions. This solution is
obtained as a linear combination of the closed conformal Killing-Yano tensor
$h_{ab}$, which is present in such a spacetime, and a derivative of the primary
Killing vector, associated with $h_{ab}$. For the vanishing cosmological
constant the obtained solution reduces to the Wald's electromagnetic field
generated from the primary Killing vector.
