We study the inverse problem of determining the magnetic field and the electric potential entering the Schrodinger equation in an infinite 3D cylindrical domain, by Dirichlet-to-Neumann map. The cylindrical domain we consider is a closed waveguide in the sense that the cross section is a bounded domain of the plane. We prove that the knowledge of the Dirichlet-to-Neumann map determines uniquely, and even Holder-stably, the magnetic field induced by the magnetic potential and the electric potential. Moreover, if the maximal strength of both the magnetic field and the electric potential, is attained in a fixed bounded subset of the domain, we extend the above results by taking finitely extended boundary observations of the solution, only.