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. (C) 2017 The Authors. Published by Elsevier B.V.