  Magnetic fields are ubiquitous in the Universe. Recently, cosmological
simulations of galaxies have successfully begun to incorporate magnetic fields
and their evolution in galaxies and their haloes. However, so far they have
mostly focused on Milky Way-like galaxies. Here we analyse a sample of high
resolution cosmological zoom simulations of disc galaxies in haloes with mass
$M_\mathrm{200c}$ from $10^{10}\,\mathrm{M}_\odot$ to
$10^{13}\,\mathrm{M}_\odot$, simulated with the Auriga galaxy formation model.
We show that with sufficient numerical resolution the magnetic field
amplification and saturation is converged. The magnetic field strength reaches
equipartition with turbulent energy density for galaxies in haloes with
$M_\mathrm{200c}\gtrsim 10^{11.5}\,\mathrm{M_\odot}$. For galaxies in less
massive haloes, the magnetic field strength saturates at a fraction of
equipartition that decreases with decreasing halo mass. For our lowest mass
haloes, the magnetic field saturates significantly below $10\%$ of
equipartition. We quantify the resolution we need to obtain converged magnetic
field strengths and discuss our resolution requirements also in the context of
the IllustrisTNG cosmological box simulations. We show that, at $z=0$,
rotation-dominated galaxies in our sample exhibit for the most part an ordered
large scale magnetic field, with fewer field reversals in more massive
galaxies. Finally, we compare the magnetic fields in our cosmological galaxies
at $z=0$ with simulations of isolated galaxies in a collapsing halo setup. Our
results pave the way for detailed studies of cosmic rays and other physical
processes in similar cosmological galaxy simulations that crucially depend on
the strength and structure of magnetic fields.
