  The circumgalactic medium (CGM) is one of the frontiers of galaxy formation
and intimately connected to the galaxy via accretion of gas on to the galaxy
and gaseous outflows from the galaxy. Here we analyse the magnetic field in the
CGM of the Milky Way-like galaxies simulated as part of the \textsc{Auriga}
project that constitutes a set of high resolution cosmological
magnetohydrodynamical zoom simulations. We show that before $z=1$ the CGM
becomes magnetised via galactic outflows that transport magnetised gas from the
disk into the halo. At this time the magnetisation of the CGM closely follows
its metal enrichment. We then show that at low redshift an in-situ turbulent
dynamo that operates on a timescale of Gigayears further amplifies the magnetic
field in the CGM and saturates before $z=0$. The magnetic field strength
reaches a typical value of $0.1\,\mu G$ at the virial radius at $z=0$ and
becomes mostly uniform within the virial radius. Its Faraday rotation signal is
in excellent agreement with recent observations. For most of its evolution the
magnetic field in the CGM is an unordered small scale field. Only strong
coherent outflows at low redshift are able to order the magnetic field in parts
of the CGM that are directly displaced by these outflows.
